pub trait FromRequest<S, M = ViaRequest>: Sized {
type Rejection: IntoResponse;
// Required method
fn from_request<'life0, 'async_trait>(
req: Request<Body>,
state: &'life0 S,
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Rejection>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}
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
.
See axum::extract
for more general docs about extractors.
Required Associated Types§
Sourcetype Rejection: IntoResponse
type Rejection: IntoResponse
If the extractor fails it’ll use this “rejection” type. A rejection is a kind of error that can be converted into a response.
Required Methods§
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<S> FromRequest<S> for Bytes
impl<S> FromRequest<S> for Bytes
Source§impl<S> FromRequest<S> for BytesMut
impl<S> FromRequest<S> for BytesMut
Source§impl<S> FromRequest<S> for Request<Body>
impl<S> FromRequest<S> for Request<Body>
Source§impl<S> FromRequest<S> for String
impl<S> FromRequest<S> for String
Source§impl<S, T1> FromRequest<S> for (T1,)
impl<S, T1> FromRequest<S> for (T1,)
Source§impl<S, T1, T2> FromRequest<S> for (T1, T2)
impl<S, T1, T2> FromRequest<S> for (T1, T2)
Source§impl<S, T1, T2, T3> FromRequest<S> for (T1, T2, T3)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequest<S> + Send,
S: Send + Sync,
impl<S, T1, T2, T3> FromRequest<S> for (T1, T2, T3)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequest<S> + Send,
S: Send + Sync,
type Rejection = Response<Body>
fn from_request<'life0, 'async_trait>(
req: Request<Body>,
state: &'life0 S,
) -> Pin<Box<dyn Future<Output = Result<(T1, T2, T3), <(T1, T2, T3) as FromRequest<S>>::Rejection>> + Send + 'async_trait>>where
'life0: 'async_trait,
(T1, T2, T3): 'async_trait,
Source§impl<S, T1, T2, T3, T4> FromRequest<S> for (T1, T2, T3, T4)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequest<S> + Send,
S: Send + Sync,
impl<S, T1, T2, T3, T4> FromRequest<S> for (T1, T2, T3, T4)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequest<S> + Send,
S: Send + Sync,
type Rejection = Response<Body>
fn from_request<'life0, 'async_trait>(
req: Request<Body>,
state: &'life0 S,
) -> Pin<Box<dyn Future<Output = Result<(T1, T2, T3, T4), <(T1, T2, T3, T4) as FromRequest<S>>::Rejection>> + Send + 'async_trait>>where
'life0: 'async_trait,
(T1, T2, T3, T4): 'async_trait,
Source§impl<S, T1, T2, T3, T4, T5> FromRequest<S> for (T1, T2, T3, T4, T5)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequest<S> + Send,
S: Send + Sync,
impl<S, T1, T2, T3, T4, T5> FromRequest<S> for (T1, T2, T3, T4, T5)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequest<S> + Send,
S: Send + Sync,
type Rejection = Response<Body>
fn from_request<'life0, 'async_trait>(
req: Request<Body>,
state: &'life0 S,
) -> Pin<Box<dyn Future<Output = Result<(T1, T2, T3, T4, T5), <(T1, T2, T3, T4, T5) as FromRequest<S>>::Rejection>> + Send + 'async_trait>>where
'life0: 'async_trait,
(T1, T2, T3, T4, T5): 'async_trait,
Source§impl<S, T1, T2, T3, T4, T5, T6> FromRequest<S> for (T1, T2, T3, T4, T5, T6)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequest<S> + Send,
S: Send + Sync,
impl<S, T1, T2, T3, T4, T5, T6> FromRequest<S> for (T1, T2, T3, T4, T5, T6)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequest<S> + Send,
S: Send + Sync,
type Rejection = Response<Body>
fn from_request<'life0, 'async_trait>(
req: Request<Body>,
state: &'life0 S,
) -> Pin<Box<dyn Future<Output = Result<(T1, T2, T3, T4, T5, T6), <(T1, T2, T3, T4, T5, T6) as FromRequest<S>>::Rejection>> + Send + 'async_trait>>where
'life0: 'async_trait,
(T1, T2, T3, T4, T5, T6): 'async_trait,
Source§impl<S, T1, T2, T3, T4, T5, T6, T7> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequest<S> + Send,
S: Send + Sync,
impl<S, T1, T2, T3, T4, T5, T6, T7> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequest<S> + Send,
S: Send + Sync,
type Rejection = Response<Body>
fn from_request<'life0, 'async_trait>(
req: Request<Body>,
state: &'life0 S,
) -> Pin<Box<dyn Future<Output = Result<(T1, T2, T3, T4, T5, T6, T7), <(T1, T2, T3, T4, T5, T6, T7) as FromRequest<S>>::Rejection>> + Send + 'async_trait>>where
'life0: 'async_trait,
(T1, T2, T3, T4, T5, T6, T7): 'async_trait,
Source§impl<S, T1, T2, T3, T4, T5, T6, T7, T8> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7, T8)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequestParts<S> + Send,
T8: FromRequest<S> + Send,
S: Send + Sync,
impl<S, T1, T2, T3, T4, T5, T6, T7, T8> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7, T8)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequestParts<S> + Send,
T8: FromRequest<S> + Send,
S: Send + Sync,
type Rejection = Response<Body>
fn from_request<'life0, 'async_trait>(
req: Request<Body>,
state: &'life0 S,
) -> Pin<Box<dyn Future<Output = Result<(T1, T2, T3, T4, T5, T6, T7, T8), <(T1, T2, T3, T4, T5, T6, T7, T8) as FromRequest<S>>::Rejection>> + Send + 'async_trait>>where
'life0: 'async_trait,
(T1, T2, T3, T4, T5, T6, T7, T8): 'async_trait,
Source§impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7, T8, T9)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequestParts<S> + Send,
T8: FromRequestParts<S> + Send,
T9: FromRequest<S> + Send,
S: Send + Sync,
impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7, T8, T9)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequestParts<S> + Send,
T8: FromRequestParts<S> + Send,
T9: FromRequest<S> + Send,
S: Send + Sync,
type Rejection = Response<Body>
fn from_request<'life0, 'async_trait>(
req: Request<Body>,
state: &'life0 S,
) -> Pin<Box<dyn Future<Output = Result<(T1, T2, T3, T4, T5, T6, T7, T8, T9), <(T1, T2, T3, T4, T5, T6, T7, T8, T9) as FromRequest<S>>::Rejection>> + Send + 'async_trait>>where
'life0: 'async_trait,
(T1, T2, T3, T4, T5, T6, T7, T8, T9): 'async_trait,
Source§impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequestParts<S> + Send,
T8: FromRequestParts<S> + Send,
T9: FromRequestParts<S> + Send,
T10: FromRequest<S> + Send,
S: Send + Sync,
impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequestParts<S> + Send,
T8: FromRequestParts<S> + Send,
T9: FromRequestParts<S> + Send,
T10: FromRequest<S> + Send,
S: Send + Sync,
type Rejection = Response<Body>
fn from_request<'life0, 'async_trait>(
req: Request<Body>,
state: &'life0 S,
) -> Pin<Box<dyn Future<Output = Result<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10), <(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) as FromRequest<S>>::Rejection>> + Send + 'async_trait>>where
'life0: 'async_trait,
(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10): 'async_trait,
Source§impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequestParts<S> + Send,
T8: FromRequestParts<S> + Send,
T9: FromRequestParts<S> + Send,
T10: FromRequestParts<S> + Send,
T11: FromRequest<S> + Send,
S: Send + Sync,
impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequestParts<S> + Send,
T8: FromRequestParts<S> + Send,
T9: FromRequestParts<S> + Send,
T10: FromRequestParts<S> + Send,
T11: FromRequest<S> + Send,
S: Send + Sync,
type Rejection = Response<Body>
fn from_request<'life0, 'async_trait>(
req: Request<Body>,
state: &'life0 S,
) -> Pin<Box<dyn Future<Output = Result<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11), <(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) as FromRequest<S>>::Rejection>> + Send + 'async_trait>>where
'life0: 'async_trait,
(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11): 'async_trait,
Source§impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequestParts<S> + Send,
T8: FromRequestParts<S> + Send,
T9: FromRequestParts<S> + Send,
T10: FromRequestParts<S> + Send,
T11: FromRequestParts<S> + Send,
T12: FromRequest<S> + Send,
S: Send + Sync,
impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequestParts<S> + Send,
T8: FromRequestParts<S> + Send,
T9: FromRequestParts<S> + Send,
T10: FromRequestParts<S> + Send,
T11: FromRequestParts<S> + Send,
T12: FromRequest<S> + Send,
S: Send + Sync,
type Rejection = Response<Body>
fn from_request<'life0, 'async_trait>(
req: Request<Body>,
state: &'life0 S,
) -> Pin<Box<dyn Future<Output = Result<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12), <(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) as FromRequest<S>>::Rejection>> + Send + 'async_trait>>where
'life0: 'async_trait,
(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12): 'async_trait,
Source§impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequestParts<S> + Send,
T8: FromRequestParts<S> + Send,
T9: FromRequestParts<S> + Send,
T10: FromRequestParts<S> + Send,
T11: FromRequestParts<S> + Send,
T12: FromRequestParts<S> + Send,
T13: FromRequest<S> + Send,
S: Send + Sync,
impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequestParts<S> + Send,
T8: FromRequestParts<S> + Send,
T9: FromRequestParts<S> + Send,
T10: FromRequestParts<S> + Send,
T11: FromRequestParts<S> + Send,
T12: FromRequestParts<S> + Send,
T13: FromRequest<S> + Send,
S: Send + Sync,
type Rejection = Response<Body>
fn from_request<'life0, 'async_trait>(
req: Request<Body>,
state: &'life0 S,
) -> Pin<Box<dyn Future<Output = Result<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13), <(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) as FromRequest<S>>::Rejection>> + Send + 'async_trait>>where
'life0: 'async_trait,
(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13): 'async_trait,
Source§impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequestParts<S> + Send,
T8: FromRequestParts<S> + Send,
T9: FromRequestParts<S> + Send,
T10: FromRequestParts<S> + Send,
T11: FromRequestParts<S> + Send,
T12: FromRequestParts<S> + Send,
T13: FromRequestParts<S> + Send,
T14: FromRequest<S> + Send,
S: Send + Sync,
impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequestParts<S> + Send,
T8: FromRequestParts<S> + Send,
T9: FromRequestParts<S> + Send,
T10: FromRequestParts<S> + Send,
T11: FromRequestParts<S> + Send,
T12: FromRequestParts<S> + Send,
T13: FromRequestParts<S> + Send,
T14: FromRequest<S> + Send,
S: Send + Sync,
type Rejection = Response<Body>
fn from_request<'life0, 'async_trait>(
req: Request<Body>,
state: &'life0 S,
) -> Pin<Box<dyn Future<Output = Result<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14), <(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) as FromRequest<S>>::Rejection>> + Send + 'async_trait>>where
'life0: 'async_trait,
(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14): 'async_trait,
Source§impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequestParts<S> + Send,
T8: FromRequestParts<S> + Send,
T9: FromRequestParts<S> + Send,
T10: FromRequestParts<S> + Send,
T11: FromRequestParts<S> + Send,
T12: FromRequestParts<S> + Send,
T13: FromRequestParts<S> + Send,
T14: FromRequestParts<S> + Send,
T15: FromRequest<S> + Send,
S: Send + Sync,
impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequestParts<S> + Send,
T8: FromRequestParts<S> + Send,
T9: FromRequestParts<S> + Send,
T10: FromRequestParts<S> + Send,
T11: FromRequestParts<S> + Send,
T12: FromRequestParts<S> + Send,
T13: FromRequestParts<S> + Send,
T14: FromRequestParts<S> + Send,
T15: FromRequest<S> + Send,
S: Send + Sync,
type Rejection = Response<Body>
fn from_request<'life0, 'async_trait>(
req: Request<Body>,
state: &'life0 S,
) -> Pin<Box<dyn Future<Output = Result<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15), <(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) as FromRequest<S>>::Rejection>> + Send + 'async_trait>>where
'life0: 'async_trait,
(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15): 'async_trait,
Source§impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequestParts<S> + Send,
T8: FromRequestParts<S> + Send,
T9: FromRequestParts<S> + Send,
T10: FromRequestParts<S> + Send,
T11: FromRequestParts<S> + Send,
T12: FromRequestParts<S> + Send,
T13: FromRequestParts<S> + Send,
T14: FromRequestParts<S> + Send,
T15: FromRequestParts<S> + Send,
T16: FromRequest<S> + Send,
S: Send + Sync,
impl<S, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> FromRequest<S> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)where
T1: FromRequestParts<S> + Send,
T2: FromRequestParts<S> + Send,
T3: FromRequestParts<S> + Send,
T4: FromRequestParts<S> + Send,
T5: FromRequestParts<S> + Send,
T6: FromRequestParts<S> + Send,
T7: FromRequestParts<S> + Send,
T8: FromRequestParts<S> + Send,
T9: FromRequestParts<S> + Send,
T10: FromRequestParts<S> + Send,
T11: FromRequestParts<S> + Send,
T12: FromRequestParts<S> + Send,
T13: FromRequestParts<S> + Send,
T14: FromRequestParts<S> + Send,
T15: FromRequestParts<S> + Send,
T16: FromRequest<S> + Send,
S: Send + Sync,
type Rejection = Response<Body>
fn from_request<'life0, 'async_trait>(
req: Request<Body>,
state: &'life0 S,
) -> Pin<Box<dyn Future<Output = Result<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16), <(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) as FromRequest<S>>::Rejection>> + Send + 'async_trait>>where
'life0: 'async_trait,
(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16): 'async_trait,
Source§impl<S, T> FromRequest<S> for Option<T>
impl<S, T> FromRequest<S> for Option<T>
Source§impl<S, T> FromRequest<S> for Result<T, <T as FromRequest<S>>::Rejection>
impl<S, T> FromRequest<S> for Result<T, <T as FromRequest<S>>::Rejection>
type Rejection = Infallible
fn from_request<'life0, 'async_trait>( req: Request<Body>, state: &'life0 S, ) -> Pin<Box<dyn Future<Output = Result<Result<T, <T as FromRequest<S>>::Rejection>, <Result<T, <T as FromRequest<S>>::Rejection> as FromRequest<S>>::Rejection>> + Send + 'async_trait>>
Implementors§
Source§impl<S> FromRequest<S> for Body
impl<S> FromRequest<S> for Body
type Rejection = Infallible
Source§impl<S> FromRequest<S> for RawForm
impl<S> FromRequest<S> for RawForm
type Rejection = RawFormRejection
Source§impl<S, T> FromRequest<S, ViaParts> for T
impl<S, T> FromRequest<S, ViaParts> for T
type Rejection = <T as FromRequestParts<S>>::Rejection
Source§impl<T, S> FromRequest<S> for Json<T>
Available on crate feature json
only.
impl<T, S> FromRequest<S> for Json<T>
Available on crate feature
json
only.