Trait OptionalFromRequest
pub trait OptionalFromRequest<S, M = ViaRequest>: Sized
Customize the behavior of Option<Self> as a FromRequest 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(req: Request, state: &S) -> impl Future<Output = Result<Option<Self>, Self::Rejection>> + SendPerform the extraction.