pub trait FromRequestParts: Sized {
type Rejection: Into<OxiHttpError>;
// Required method
fn from_request_parts(
parts: &RequestParts<'_>,
) -> Result<Self, Self::Rejection>;
}Expand description
Trait for types that can be extracted from RequestParts.
Implement this trait to create custom extractors that can be used with
Request::extract.
Required Associated Types§
Sourcetype Rejection: Into<OxiHttpError>
type Rejection: Into<OxiHttpError>
The error type returned when extraction fails.
Required Methods§
Sourcefn from_request_parts(parts: &RequestParts<'_>) -> Result<Self, Self::Rejection>
fn from_request_parts(parts: &RequestParts<'_>) -> Result<Self, Self::Rejection>
Attempt to extract Self from the request parts.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".