HttpResponse

Trait HttpResponse 

Source
pub trait HttpResponse: Send + Unpin {
    type Headers: HttpHeaders;
    type ChunkError: Send + Debug;

    // 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", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl HttpResponse for Response

Source§

type Headers = HeaderMap

Source§

type ChunkError = Error

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

Implementors§