pub struct HttpRequest { /* private fields */ }Expand description
Concrete implementation of IHttpRequest.
Body bytes are stored eagerly so that IHttpRequest can be dyn-compatible
without requiring &mut self for async body reading.
Trait Implementations§
Source§impl IHttpRequest for HttpRequest
impl IHttpRequest for HttpRequest
fn method(&self) -> &str
fn path(&self) -> &str
fn header(&self, name: &str) -> Option<&str>
fn query(&self) -> &HashMap<String, String>
fn route_params(&self) -> &HashMap<String, String>
fn route_params_mut(&mut self) -> &mut HashMap<String, String>
Source§fn route_pattern(&self) -> Option<&str>
fn route_pattern(&self) -> Option<&str>
The original route pattern that was matched (e.g.,
"/api/users/{id}").
Set by the router after successful route matching.fn route_pattern_mut(&mut self) -> &mut Option<String>
Auto Trait Implementations§
impl Freeze for HttpRequest
impl RefUnwindSafe for HttpRequest
impl Send for HttpRequest
impl Sync for HttpRequest
impl Unpin for HttpRequest
impl UnsafeUnpin for HttpRequest
impl UnwindSafe for HttpRequest
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