spin_sdk::http::conversions

Trait TryFromIncomingRequest

Source
pub trait TryFromIncomingRequest {
    type Error;

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

A trait for trying to convert from an IncomingRequest to the implementing type

Required Associated Types§

Source

type Error

The error if conversion fails

Required Methods§

Source

fn try_from_incoming_request<'async_trait>( value: IncomingRequest, ) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,

Try to turn the IncomingRequest into the implementing type

Implementors§