pub struct Request { /* private fields */ }Expand description
HTTP Request wrapper
Provides access to all parts of an incoming HTTP request.
Implementations§
Source§impl Request
impl Request
Sourcepub fn extensions(&self) -> &Extensions
pub fn extensions(&self) -> &Extensions
Get request extensions
Sourcepub fn extensions_mut(&mut self) -> &mut Extensions
pub fn extensions_mut(&mut self) -> &mut Extensions
Get mutable extensions
Sourcepub fn query_string(&self) -> Option<&str>
pub fn query_string(&self) -> Option<&str>
Get the query string
Sourcepub fn path_params(&self) -> &HashMap<String, String>
pub fn path_params(&self) -> &HashMap<String, String>
Get path parameters
Sourcepub fn path_param(&self, name: &str) -> Option<&String>
pub fn path_param(&self, name: &str) -> Option<&String>
Get a specific path parameter
Sourcepub fn state(&self) -> &Arc<Extensions>
pub fn state(&self) -> &Arc<Extensions>
Get shared state
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Request
impl !RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl !UnwindSafe for Request
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