-
Notifications
You must be signed in to change notification settings - Fork 320
Description
Based on feedback from the architect review and some of our own conversations over time (see also, "naming is hard"), we've decided to make the following type name changes:
| Description | Sync | Async |
|---|---|---|
| Main API | Response | AsyncResponse |
| Contained by parent | RawResponse | |
| Contained by parent | ResponseBody |
Make it clear in the description as well that this is based more on Response : AsyncResponse :: Iterator : AsyncIterator (in std), not .NET's pattern of slapping "Async" on the end (methods) or beginning (some types) of things.
Additionally, Response on down will have both borrowed ref getters and ownership gettings i.e., body(&self) -> &ResponseBody and into_body(self) -> ResponseBody because all data is available: no longer do we have to asynchronously collect all the bytes. We'll effectively rename the existing into_body(self) -> Result<T> to into_model(self) -> Result<T> based on architect review feedback and our own past conversations about this naming. This will be a fairly significant breaking change to customers, which is why we figured we'd break it all now in one shot.
AsyncResponse on down will still require taking ownership, but we also should also make sure we have consistent into_body(self) or similar patterns.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status