Struct httpcodec::Request
[−]
[src]
pub struct Request<T> { /* fields omitted */ }
HTTP request message.
Methods
impl<T> Request<T>
[src]
pub fn new(
method: Method,
target: RequestTarget,
version: HttpVersion,
body: T
) -> Self
[src]
method: Method,
target: RequestTarget,
version: HttpVersion,
body: T
) -> Self
Makes a new Request
instance with the given request-line components and body.
pub fn method(&self) -> Method
[src]
Returns the method of the request.
pub fn request_target(&self) -> RequestTarget
[src]
Returns the target of the request.
pub fn http_version(&self) -> HttpVersion
[src]
Returns the HTTP version of the request.
pub fn header(&self) -> Header
[src]
Returns the header of the request.
pub fn header_mut(&mut self) -> HeaderMut
[src]
Returns the mutable header of the request.
pub fn body(&self) -> &T
[src]
Returns a reference to the body of the request.
pub fn body_mut(&mut self) -> &mut T
[src]
Returns a mutable reference to the body of the request.
pub fn into_body(self) -> T
[src]
Takes ownership of the request, and returns its body.
Trait Implementations
impl<T: Debug> Debug for Request<T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more