Struct uhttp_request::RequestLine
[−]
[src]
pub struct RequestLine<'a> { pub method: &'a str, pub target: &'a str, pub version: &'a str, }
A "Request-Line" [RFC7230§3.1.1] that begins an HTTP request.
Fields
method: &'a str
Request method on target resource.
This is guaranteed to be free of spaces but is not guaranteed to be free of other whitespace or otherwise syntactically correct.
target: &'a str
Target resource of request.
This is guaranteed to be free of spaces but is not guaranteed to be free of other whitespace or otherwise syntactically correct.
version: &'a str
HTTP protocol version of request.
This is guaranteed to be free of spaces but is not guaranteed to be free of other whitespace or otherwise syntactically correct.
Methods
impl<'a> RequestLine<'a>
[src]
fn new(buf: &'a [u8]) -> Result<(Self, &'a [u8])>
Try to parse the given bytes into RequestLine
components.
On success, return Ok((rl, rest))
, where rl
is the RequestLine
and rest
is
a slice that begins directly after the Request-Line terminating CRLF.
Trait Implementations
impl<'a> Copy for RequestLine<'a>
[src]
impl<'a> Clone for RequestLine<'a>
[src]
fn clone(&self) -> RequestLine<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'a> Eq for RequestLine<'a>
[src]
impl<'a> PartialEq for RequestLine<'a>
[src]
fn eq(&self, __arg_0: &RequestLine<'a>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &RequestLine<'a>) -> bool
This method tests for !=
.