pub trait ResponseExt {
    // Required method
    fn bytes(
        self
    ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'static>>;

    // Provided methods
    fn json<T: DeserializeOwned>(
        self
    ) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'static>>
       where Self: Sized + Send + 'static { ... }
    fn body_string(
        self
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'static>>
       where Self: Sized + Send + 'static { ... }
}

Required Methods§

source

fn bytes(self) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'static>>

Provided Methods§

source

fn json<T: DeserializeOwned>( self ) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'static>>
where Self: Sized + Send + 'static,

source

fn body_string( self ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'static>>
where Self: Sized + Send + 'static,

Implementations on Foreign Types§

source§

impl<T> ResponseExt for Response<T>
where T: HttpBody + Send + 'static, T::Data: Send, T::Error: Debug,

source§

fn bytes(self) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'static>>

Implementors§