pub trait FromResponse: Sized {
    // Required method
    fn from_response<'async_trait, B>(
        response: Response<B>
    ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
       where B: Body<Data = Bytes, Error = Error> + Send + 'async_trait,
             Self: 'async_trait;
}
Expand description

A trait for mapping from a http::Response to an another type.

Required Methods§

source

fn from_response<'async_trait, B>( response: Response<B> ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
where B: Body<Data = Bytes, Error = Error> + Send + 'async_trait, Self: 'async_trait,

Object Safety§

This trait is not object safe.

Implementors§