pub struct Request<T> { /* private fields */ }Expand description
HTTP request message.
Implementations§
Source§impl<T> Request<T>
impl<T> Request<T>
Sourcepub fn new(
method: Method<'_>,
target: RequestTarget<'_>,
version: HttpVersion,
body: T,
) -> Self
pub fn new( method: Method<'_>, target: RequestTarget<'_>, version: HttpVersion, body: T, ) -> Self
Makes a new Request instance with the given request-line components and body.
Sourcepub fn request_target(&self) -> RequestTarget<'_>
pub fn request_target(&self) -> RequestTarget<'_>
Returns the target of the request.
Sourcepub fn http_version(&self) -> HttpVersion
pub fn http_version(&self) -> HttpVersion
Returns the HTTP version of the request.
Sourcepub fn header_mut(&mut self) -> HeaderMut<'_>
pub fn header_mut(&mut self) -> HeaderMut<'_>
Returns the mutable header of the request.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Request<T>where
T: Freeze,
impl<T> RefUnwindSafe for Request<T>where
T: RefUnwindSafe,
impl<T> Send for Request<T>where
T: Send,
impl<T> Sync for Request<T>where
T: Sync,
impl<T> Unpin for Request<T>where
T: Unpin,
impl<T> UnwindSafe for Request<T>where
T: UnwindSafe,
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