Struct hyper::Uri
[−]
[src]
pub struct Uri { /* fields omitted */ }The Request-URI of a Request's StartLine.
From Section 5.3, Request Target:
Once an inbound connection is obtained, the client sends an HTTP request message (Section 3) with a request-target derived from the target URI. There are four distinct formats for the request-target, depending on both the method being requested and whether the request is to a proxy.
request-target = origin-form / absolute-form / authority-form / asterisk-form
Uri explanations
abc://username:password@example.com:123/path/data?key=value&key2=value2#fragid1
|-| |-------------------------------||--------| |-------------------| |-----|
| | | | |
scheme authority path query fragment
Methods
impl Uri[src]
fn path(&self) -> &str
Get the path of this Uri.
fn scheme(&self) -> Option<&str>
Get the scheme of this Uri.
Get the authority of this Uri.
fn host(&self) -> Option<&str>
Get the host of this Uri.
fn port(&self) -> Option<u16>
Get the port of this Uri.
fn query(&self) -> Option<&str>
Get the query string of this Uri, starting after the ?.
fn is_absolute(&self) -> bool
Returns whether this URI is in absolute-form.
An example of absolute form is https://hyper.rs.
Trait Implementations
impl Clone for Uri[src]
fn clone(&self) -> Uri
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 Hash for Uri[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 FromStr for Uri[src]
type Err = UriError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Uri, UriError>
Parses a string s to return a value of this type. Read more
impl PartialEq for Uri[src]
fn eq(&self, other: &Uri) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0
This method tests for !=.
impl<'a> PartialEq<&'a str> for Uri[src]
fn eq(&self, other: &&'a str) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0
This method tests for !=.