Trait viz_core::FromRequest

source ·
pub trait FromRequest: Sized {
    type Error: IntoResponse;

    // Required method
    fn extract(
        req: &mut Request
    ) -> impl Future<Output = Result<Self, Self::Error>> + Send;
}
Expand description

An interface for extracting data from the HTTP Request.

Required Associated Types§

source

type Error: IntoResponse

The type returned in the event of a conversion error.

Required Methods§

source

fn extract( req: &mut Request ) -> impl Future<Output = Result<Self, Self::Error>> + Send

Extracts this type from the HTTP Request.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromRequest for ()

§

type Error = Error

source§

async fn extract(req: &mut Request) -> Result<(), Self::Error>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> FromRequest for (A, B, C, D, E, F, G, H, I, J, K, L)

source§

impl<B, C, D, E, F, G, H, I, J, K, L> FromRequest for (B, C, D, E, F, G, H, I, J, K, L)

source§

impl<C, D, E, F, G, H, I, J, K, L> FromRequest for (C, D, E, F, G, H, I, J, K, L)

source§

impl<D, E, F, G, H, I, J, K, L> FromRequest for (D, E, F, G, H, I, J, K, L)

source§

impl<E, F, G, H, I, J, K, L> FromRequest for (E, F, G, H, I, J, K, L)

source§

impl<F, G, H, I, J, K, L> FromRequest for (F, G, H, I, J, K, L)

§

type Error = Error

source§

async fn extract( req: &mut Request ) -> Result<(F, G, H, I, J, K, L), Self::Error>

source§

impl<G, H, I, J, K, L> FromRequest for (G, H, I, J, K, L)

§

type Error = Error

source§

async fn extract(req: &mut Request) -> Result<(G, H, I, J, K, L), Self::Error>

source§

impl<H, I, J, K, L> FromRequest for (H, I, J, K, L)

§

type Error = Error

source§

async fn extract(req: &mut Request) -> Result<(H, I, J, K, L), Self::Error>

source§

impl<I, J, K, L> FromRequest for (I, J, K, L)

§

type Error = Error

source§

async fn extract(req: &mut Request) -> Result<(I, J, K, L), Self::Error>

source§

impl<J, K, L> FromRequest for (J, K, L)

§

type Error = Error

source§

async fn extract(req: &mut Request) -> Result<(J, K, L), Self::Error>

source§

impl<K, L> FromRequest for (K, L)

§

type Error = Error

source§

async fn extract(req: &mut Request) -> Result<(K, L), Self::Error>

source§

impl<L> FromRequest for (L,)

§

type Error = Error

source§

async fn extract(req: &mut Request) -> Result<(L,), Self::Error>

source§

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

§

type Error = Infallible

source§

async fn extract(req: &mut Request) -> Result<Self, Self::Error>

source§

impl<T> FromRequest for Result<T, T::Error>
where T: FromRequest,

§

type Error = Infallible

source§

async fn extract(req: &mut Request) -> Result<Self, Self::Error>

Implementors§

source§

impl FromRequest for CsrfToken

Available on crate feature csrf only.
§

type Error = Error

source§

impl FromRequest for Cookies

Available on crate feature cookie only.
source§

impl FromRequest for Limits

Available on crate feature limits only.
source§

impl FromRequest for Session

Available on crate feature session only.
source§

impl FromRequest for WebSocket

Available on crate feature websocket only.
source§

impl FromRequest for Multipart

Available on crate feature multipart only.
source§

impl<T> FromRequest for Form<T>

Available on crate feature form only.
source§

impl<T> FromRequest for Header<T>
where T: Header,

source§

impl<T> FromRequest for Json<T>

Available on crate feature json only.
source§

impl<T> FromRequest for Params<T>

Available on crate feature params only.
source§

impl<T> FromRequest for Query<T>

Available on crate feature query only.
source§

impl<T> FromRequest for State<T>
where T: Clone + Send + Sync + 'static,

Available on crate feature state only.