pub trait FromRequest<B = Body>: Sized {
type Error: Into<BoxedErrorResponse>;
// Required method
fn from_request(
head_parts: &mut RequestHeadParts,
body: B,
) -> impl Future<Output = Result<Self, Self::Error>> + Send;
}Expand description
A trait for extractor types.
Implementors of the FromRequest consume the request body and usually convert it
to some form of data.
Required Associated Types§
type Error: Into<BoxedErrorResponse>
Required Methods§
fn from_request( head_parts: &mut RequestHeadParts, body: B, ) -> impl Future<Output = Result<Self, Self::Error>> + 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.