Trait OptionalFromRequest
trait OptionalFromRequest<S, M = private::ViaRequest>: Sized
Customize the behavior of Option<Self> as a FromRequest extractor.
Associated Types
type Rejection: TraitBound { trait_: Path { path: "IntoResponse", id: Id(175), args: None }, generic_params: [], modifier: None }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 as >::Rejection>> + SendPerform the extraction.