pub trait HttpResponse:
Send
+ Sync
+ Debug
+ Unpin {
type Headers: HttpHeaders;
type ChunkError: Error + Send + Sync + Unpin;
// Required methods
fn headers(&self) -> &Self::Headers;
fn url(&self) -> &Url;
fn chunk(
&mut self,
) -> impl Future<Output = Result<Option<Bytes>, Self::ChunkError>> + Send;
}Expand description
Abstraction over an HTTP response that provides headers, final URL, and chunked body reading.
Required Associated Types§
Sourcetype Headers: HttpHeaders
type Headers: HttpHeaders
The response’s header map type.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".