pub trait FromRequest<State>: Sized {
type Rejection: IntoResponse;
// Required method
fn from_request(
ctx: &mut RequestContext,
state: &Arc<State>,
) -> impl Future<Output = Result<Self, Self::Rejection>> + Send;
}Expand description
Extract a typed value from a request context.
Required Associated Types§
type Rejection: IntoResponse
Required Methods§
fn from_request( ctx: &mut RequestContext, state: &Arc<State>, ) -> impl Future<Output = Result<Self, Self::Rejection>> + Send
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.