Module request

Module request 

Source
Expand description

Types and traits for extracting data from requests.

See Accessing Un-modelled data a comprehensive overview.

The following implementations exist:

  • Tuples up to size 8, extracting each component.
  • Option<T>: Some(T) if extracting T is successful, None otherwise.
  • Result<T, T::Rejection>: Ok(T) if extracting T is successful, Err(T::Rejection) otherwise.

when T: FromParts.

Modules§

connect_info
The ConnectInfo struct is included in [http::Request]s when IntoMakeServiceWithConnectInfo is used. ConnectInfo’s FromParts implementation allows it to be extracted from the [http::Request].
extension
Extension types.
lambdaaws-lambda
The [lambda_http] types included in [http::Request]s when LambdaHandler is used. Each are given a FromParts implementation for easy use within handlers.
request_idrequest-id
Request IDs

Traits§

FromParts
Provides a protocol aware extraction from a [Request]. This borrows the [Parts], in contrast to FromRequest which consumes the entire [http::Request] including the body.
FromRequest
Provides a protocol aware extraction from a [Request]. This consumes the [Request], including the body, in contrast to FromParts which borrows the [Parts].