Trait OptionalFromRequestParts
pub trait OptionalFromRequestParts<S>: Sized
Customize the behavior of Option<Self> as a FromRequestParts
extractor.
Associated Types
type Rejection: IntoResponse;If the extractor fails, it will use this "rejection" type.
A rejection is a kind of error that can be converted into a response.
Required Methods
fn from_request_parts(parts: &mut Parts, state: &S) -> impl Future<Output = Result<Option<Self>, Self::Rejection>> + SendPerform the extraction.