pub struct RequestParts<'a> {
pub method: &'a Method,
pub uri: &'a Uri,
pub headers: &'a HeaderMap,
pub path_params: &'a HashMap<String, String>,
}Expand description
A view into the non-body parts of a server Request.
Passed to FromRequestParts::from_request_parts implementations.
Fields§
§method: &'a MethodThe HTTP method of the request.
uri: &'a UriThe request URI.
headers: &'a HeaderMapThe request headers.
path_params: &'a HashMap<String, String>Extracted path parameters (e.g. :id in /users/:id).
Auto Trait Implementations§
impl<'a> Freeze for RequestParts<'a>
impl<'a> RefUnwindSafe for RequestParts<'a>
impl<'a> Send for RequestParts<'a>
impl<'a> Sync for RequestParts<'a>
impl<'a> Unpin for RequestParts<'a>
impl<'a> UnsafeUnpin for RequestParts<'a>
impl<'a> UnwindSafe for RequestParts<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more