Trait FromRequestParts

trait FromRequestParts<S>: Sized

Types that can be created from request parts.

Extractors that implement FromRequestParts cannot consume the request body and can thus be run in any order for handlers.

If your extractor needs to consume the request body then you should implement FromRequest and not FromRequestParts.

See axum::extract for more general docs about extractors.

Associated Types

type Rejection: TraitBound { trait_: Path { path: "IntoResponse", id: Id(172), args: None }, generic_params: [], modifier: None }

If the extractor fails it'll 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<Self, <Self as >::Rejection>> + Send

Perform the extraction.

Implementors