Skip to main content

FromRequest

Trait FromRequest 

Source
pub trait FromRequest<B = Incoming>: Sized
where B: Body<Data = Bytes> + Send + Unpin + 'static, B::Error: Display + Send + Sync + 'static,
{ // Required method fn from_request<'life0, 'async_trait>( req: &'life0 mut Request<B>, ) -> Pin<Box<dyn Future<Output = Result<Self, ExtractError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; }

Required Methods§

Source

fn from_request<'life0, 'async_trait>( req: &'life0 mut Request<B>, ) -> Pin<Box<dyn Future<Output = Result<Self, ExtractError>> + 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.

Implementors§

Source§

impl<T, B> FromRequest<B> for Json<T>
where T: DeserializeOwned + Send + 'static, B: Body<Data = Bytes> + Send + Unpin + 'static, B::Error: Display + Send + Sync + 'static,

Source§

impl<T, B> FromRequest<B> for Path<T>
where T: DeserializeOwned + Send + 'static, B: Body<Data = Bytes> + Send + Unpin + 'static, B::Error: Display + Send + Sync + 'static,

Source§

impl<T, B> FromRequest<B> for Query<T>
where T: DeserializeOwned + Send + 'static, B: Body<Data = Bytes> + Send + Unpin + 'static, B::Error: Display + Send + Sync + 'static,