Struct axum_core::extract::RequestParts [−][src]
pub struct RequestParts<B> { /* fields omitted */ }
Expand description
The type used with FromRequest
to extract data from requests.
Has several convenience methods for getting owned parts of the request.
Implementations
Create a new RequestParts
.
You generally shouldn’t need to construct this type yourself, unless
using extractors outside of axum for example to implement a
tower::Service
.
Convert this RequestParts
back into a Request
.
Fails if
- The full
HeaderMap
has been extracted, that istake_headers
have been called. - The full
Extensions
has been extracted, that istake_extensions
have been called. - The request body has been extracted, that is
take_body
have been called.
Gets a mutable reference to the request method.
Gets a mutable reference to the request HTTP version.
Gets a reference to the request headers.
Returns None
if the headers has been taken by another extractor.
Gets a mutable reference to the request headers.
Returns None
if the headers has been taken by another extractor.
Takes the headers out of the request, leaving a None
in its place.
Gets a reference to the request extensions.
Returns None
if the extensions has been taken by another extractor.
Gets a mutable reference to the request extensions.
Returns None
if the extensions has been taken by another extractor.
Takes the extensions out of the request, leaving a None
in its place.
Gets a reference to the request body.
Returns None
if the body has been taken by another extractor.
Gets a mutable reference to the request body.
Returns None
if the body has been taken by another extractor.