pub struct Request { /* private fields */ }Expand description
An HTTP request.
Implementations§
Source§impl Request
impl Request
pub fn new( method: impl Into<Method>, uri: impl Into<Uri>, headers: Header, body: impl Into<Body>, ) -> Self
pub fn method(&self) -> &Method
pub fn uri(&self) -> &Uri
pub fn headers(&self) -> &Header
pub fn body(&self) -> &Body
pub fn method_mut(&mut self) -> &mut Method
pub fn uri_mut(&mut self) -> &mut Uri
pub fn headers_mut(&mut self) -> &mut Header
pub fn body_mut(&mut self) -> &mut Body
pub fn into_body(self) -> Body
pub fn into_parts(self) -> (Method, Uri, Header, Body)
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 UnsafeUnpin 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