Struct uhttp_uri::HttpUri
[−]
[src]
pub struct HttpUri<'a> { pub scheme: HttpScheme, pub authority: &'a str, pub resource: HttpResource<'a>, }
Components in an HTTP Request Line URI.
Fields
scheme: HttpScheme
HTTP scheme of request.
This is automatically parsed to an HttpScheme
since RFC7230 only gives syntax for
the two http schemes.
Authority for the URI's target resource.
This should typically be a domain name or IP address and may also contain a username and port.
resource: HttpResource<'a>
Path and parameters for requested target resource.
Methods
impl<'a> HttpUri<'a>
[src]
fn new(s: &'a str) -> Result<Self, ()>
Try to parse the given string into HttpUri
components.
The string must contain no whitespace, as required by RFC7230§3.1.1.
Trait Implementations
impl<'a> Copy for HttpUri<'a>
[src]
impl<'a> Clone for HttpUri<'a>
[src]
fn clone(&self) -> HttpUri<'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 HttpUri<'a>
[src]
impl<'a> PartialEq for HttpUri<'a>
[src]
fn eq(&self, __arg_0: &HttpUri<'a>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &HttpUri<'a>) -> bool
This method tests for !=
.
impl<'a> Debug for HttpUri<'a>
[src]
impl<'a> Hash for HttpUri<'a>
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'a> Display for HttpUri<'a>
[src]
Writes the URI in the format required by [RFC7230§2.7.1]/[RFC7230§2.7.2].