Skip to content

Make naming more consistent #3288

@heaths

Description

@heaths

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 BufResponse AsyncRawResponse
Contained by parent ResponseBody BufResponseBody AsyncResponseBody

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

Azure.CoreThe azure_core crateClientThis issue points to a problem in the data-plane of the library.blocking-releaseBlocks release

Type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions