pub struct Request { /* private fields */ }Implementations§
Source§impl Request
impl Request
pub fn new(method: Method, uri: Uri) -> Self
pub fn default() -> Self
pub fn method(&self) -> &Method
pub fn uri(&self) -> &Uri
pub fn headers(&self) -> &HeaderMap
pub fn headers_mut(&mut self) -> &mut HeaderMap
pub fn body(&self) -> &Owned
pub fn body_mut(&mut self) -> &mut Owned
pub fn set_body(&mut self, body: impl Into<Owned>)
pub fn clear_body(&mut self)
pub fn set_body_str(&mut self, body: &str) -> &mut Self
pub fn body_str(&self) -> Option<&str>
pub fn path_param<T: AsRef<str>>(&self, key: T) -> Option<&str>
pub fn path_param_bytes<T: AsRef<str>>(&self, key: T) -> Option<&[u8]>
pub fn path_params(&self) -> PathParamsIter<'_>
pub fn path_params_len(&self) -> usize
pub fn set_path_params(&mut self, params: Vec<(Box<str>, Shared)>) -> &mut Self
pub fn insert_path_param( &mut self, key: impl AsRef<str>, value: impl Into<Shared>, ) -> &mut Self
pub fn query<T: AsRef<str>>(&self, key: T) -> Option<String>
pub fn query_bytes<T: AsRef<[u8]>>(&self, key: T) -> Option<&[u8]>
pub fn with_uri(&mut self, uri: Uri) -> &mut Self
pub fn with_query<T: Serialize>( &mut self, query: &T, ) -> Result<&mut Self, Error>
pub fn query_params_ref(&self) -> Option<Ref<'_, HashMap<String, String>>>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Request
impl !RefUnwindSafe for Request
impl !Send for Request
impl !Sync for Request
impl !UnwindSafe for Request
impl Unpin for Request
impl UnsafeUnpin 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