axum_core::extract

Type Alias Request

Source
pub type Request<T = Body> = Request<T>;
Expand description

Type alias for http::Request whose body type defaults to Body, the most common body type used with axum.

Aliased Type§

struct Request<T = Body> { /* private fields */ }

Trait Implementations§

Source§

impl<S> FromRequest<S> for Request
where S: Send + Sync,

Source§

type Rejection = Infallible

If the extractor fails it’ll use this “rejection” type. A rejection is a kind of error that can be converted into a response.
Source§

fn from_request<'life0, 'async_trait>( req: Request, _: &'life0 S, ) -> Pin<Box<dyn Future<Output = Result<Self, Self::Rejection>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Perform the extraction.
Source§

impl RequestExt for Request

Source§

fn extract<E, M>(self) -> BoxFuture<'static, Result<E, E::Rejection>>
where E: FromRequest<(), M> + 'static, M: 'static,

Apply an extractor to this Request. Read more
Source§

fn extract_with_state<E, S, M>( self, state: &S, ) -> BoxFuture<'_, Result<E, E::Rejection>>
where E: FromRequest<S, M> + 'static, S: Send + Sync,

Apply an extractor that requires some state to this Request. Read more
Source§

fn extract_parts<E>(&mut self) -> BoxFuture<'_, Result<E, E::Rejection>>
where E: FromRequestParts<()> + 'static,

Apply a parts extractor to this Request. Read more
Source§

fn extract_parts_with_state<'a, E, S>( &'a mut self, state: &'a S, ) -> BoxFuture<'a, Result<E, E::Rejection>>
where E: FromRequestParts<S> + 'static, S: Send + Sync,

Apply a parts extractor that requires some state to this Request. Read more
Source§

fn with_limited_body(self) -> Request

Source§

fn into_limited_body(self) -> Body

Consumes the request, returning the body wrapped in http_body_util::Limited if a default limit is in place, or not wrapped if the default limit is disabled.

Layout§

Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.