pub trait FromRequest<B, M = ViaRequest>: Sized {
type Rejection: IntoResponse;
// Required method
fn from_request(
req: Request<B>,
) -> impl Future<Output = Result<Self, Self::Rejection>> + Send;
}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.