Skip to main content

FromRequestParts

Trait FromRequestParts 

Source
pub trait FromRequestParts<S>: Sized {
    // Required method
    fn from_request_parts(parts: &RequestParts<'_, S>) -> Result<Self, Response>;
}
Expand description

A typed handler argument: built from the RequestParts, or a ready-to-send rejection.

Every FromRequest type is one, so #[derive(FromRequest)] structs and Validated<T> work as arguments too.

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<S, T> FromRequestParts<S> for Form<T>

Source§

impl<S, T> FromRequestParts<S> for Path<T>
where T: FromPath,

Source§

impl<S, T> FromRequestParts<S> for Query<T>

Source§

impl<S, T> FromRequestParts<S> for T
where T: FromRequest,

Source§

impl<S> FromRequestParts<S> for State<S>