titan_core

Trait FromRequest

Source
pub trait FromRequest: Sized {
    type Error: Respondable;

    // Required method
    fn from_request(req: Request) -> Result<Self, Self::Error>;
}
Expand description

Types that can be created from requests.

Extractors that implement FromRequest can consume the request body and can thus only be run once for handlers.

If your extractor doesn’t need to consume the request body then you should implement FromRequestParts and not FromRequest.

Required Associated Types§

Required Methods§

Source

fn from_request(req: Request) -> Result<Self, Self::Error>

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§

impl FromRequest for String

Source§

type Error = ()

Source§

fn from_request(req: Request) -> Result<Self, Self::Error>

Source§

impl FromRequest for Request

Source§

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

Source§

impl<T1, T2> FromRequest for (T1, T2)

Source§

impl<T1, T2, T3> FromRequest for (T1, T2, T3)

Source§

impl<T1, T2, T3, T4> FromRequest for (T1, T2, T3, T4)

Source§

impl<T1, T2, T3, T4, T5> FromRequest for (T1, T2, T3, T4, T5)

Source§

impl<T1, T2, T3, T4, T5, T6> FromRequest for (T1, T2, T3, T4, T5, T6)

Source§

impl<T1, T2, T3, T4, T5, T6, T7> FromRequest for (T1, T2, T3, T4, T5, T6, T7)

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8> FromRequest for (T1, T2, T3, T4, T5, T6, T7, T8)

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9> FromRequest for (T1, T2, T3, T4, T5, T6, T7, T8, T9)

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> FromRequest for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> FromRequest for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> FromRequest for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> FromRequest for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> FromRequest for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> FromRequest for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> FromRequest for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)

Implementors§