pub trait TryFromIncomingResponse {
    type Error;

    // Required method
    fn try_from_incoming_response<'async_trait>(
        resp: IncomingResponse
    ) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>
       where Self: Sized + 'async_trait;
}
Expand description

A trait for converting from an IncomingRequest

Required Associated Types§

source

type Error

The error if conversion fails

Required Methods§

source

fn try_from_incoming_response<'async_trait>( resp: IncomingResponse ) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,

Turn the IncomingResponse into the type

Implementations on Foreign Types§

source§

impl<B: TryFromBody> TryFromIncomingResponse for Response<B>

§

type Error = <B as TryFromBody>::Error

source§

fn try_from_incoming_response<'async_trait>( resp: IncomingResponse ) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,

Implementors§