Struct shuttle_next::http::request::Parts
source · pub struct Parts {
pub method: Method,
pub uri: Uri,
pub version: Version,
pub headers: HeaderMap<HeaderValue>,
pub extensions: Extensions,
/* private fields */
}Expand description
Component parts of an HTTP Request
The HTTP request head consists of a method, uri, version, and a set of header fields.
Fields§
§method: MethodThe request’s method
uri: UriThe request’s URI
version: VersionThe request’s version
headers: HeaderMap<HeaderValue>The request’s headers
extensions: ExtensionsThe request’s extensions
Trait Implementations§
source§impl From<Parts> for RequestWrapper
impl From<Parts> for RequestWrapper
source§fn from(parts: Parts) -> RequestWrapper
fn from(parts: Parts) -> RequestWrapper
Converts to this type from the input type.
§impl<S, B> FromRequest<S, B, ViaRequest> for Partswhere
B: Send + 'static,
S: Send + Sync,
impl<S, B> FromRequest<S, B, ViaRequest> for Partswhere B: Send + 'static, S: Send + Sync,
§type Rejection = Infallible
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.
§impl RequestPartsExt for Parts
impl RequestPartsExt for Parts
§fn extract<E>(
&mut self
) -> Pin<Box<dyn Future<Output = Result<E, <E as FromRequestParts<()>>::Rejection>> + Send, Global>>where
E: FromRequestParts<()> + 'static,
fn extract<E>( &mut self ) -> Pin<Box<dyn Future<Output = Result<E, <E as FromRequestParts<()>>::Rejection>> + Send, Global>>where E: FromRequestParts<()> + 'static,
Apply an extractor to this
Parts. Read more§fn extract_with_state<E, S, 'a>(
&'a mut self,
state: &'a S
) -> Pin<Box<dyn Future<Output = Result<E, <E as FromRequestParts<S>>::Rejection>> + Send + 'a, Global>>where
E: FromRequestParts<S> + 'static,
S: Send + Sync,
fn extract_with_state<E, S, 'a>( &'a mut self, state: &'a S ) -> Pin<Box<dyn Future<Output = Result<E, <E as FromRequestParts<S>>::Rejection>> + Send + 'a, Global>>where E: FromRequestParts<S> + 'static, S: Send + Sync,
Apply an extractor that requires some state to this
Parts. Read more