Trait FromRequest

Source
pub trait FromRequest: Sized {
    // Required method
    fn from_request<'life0, 'async_trait>(
        req: &'life0 RequestObjectWithData,
    ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A trait to extract data from the request

Required Methods§

Source

fn from_request<'life0, 'async_trait>( req: &'life0 RequestObjectWithData, ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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 FromRequest for ()

Source§

fn from_request<'life0, 'async_trait>( __arg0: &'life0 RequestObjectWithData, ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T1> FromRequest for (T1,)
where T1: FromRequest + Send,

Source§

fn from_request<'life0, 'async_trait>( req: &'life0 RequestObjectWithData, ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T1, T2> FromRequest for (T1, T2)
where T1: FromRequest + Send, T2: FromRequest + Send,

Source§

fn from_request<'life0, 'async_trait>( req: &'life0 RequestObjectWithData, ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T1, T2, T3> FromRequest for (T1, T2, T3)
where T1: FromRequest + Send, T2: FromRequest + Send, T3: FromRequest + Send,

Source§

fn from_request<'life0, 'async_trait>( req: &'life0 RequestObjectWithData, ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T1, T2, T3, T4> FromRequest for (T1, T2, T3, T4)
where T1: FromRequest + Send, T2: FromRequest + Send, T3: FromRequest + Send, T4: FromRequest + Send,

Source§

fn from_request<'life0, 'async_trait>( req: &'life0 RequestObjectWithData, ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T1, T2, T3, T4, T5> FromRequest for (T1, T2, T3, T4, T5)
where T1: FromRequest + Send, T2: FromRequest + Send, T3: FromRequest + Send, T4: FromRequest + Send, T5: FromRequest + Send,

Source§

fn from_request<'life0, 'async_trait>( req: &'life0 RequestObjectWithData, ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: FromRequest> FromRequest for Option<T>

Source§

fn from_request<'life0, 'async_trait>( req: &'life0 RequestObjectWithData, ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§