Skip to main content

HttpResponse

Trait HttpResponse 

Source
pub trait HttpResponse:
    Send
    + Debug
    + Unpin {
    type Headers: HttpHeaders;
    type ChunkError: Send + Debug + 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;
}

Required Associated Types§

Required Methods§

Source

fn headers(&self) -> &Self::Headers

Source

fn url(&self) -> &Url

Source

fn chunk( &mut self, ) -> impl Future<Output = Result<Option<Bytes>, Self::ChunkError>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl HttpResponse for Response

Implementors§