[−][src]Struct hyper::Uri
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]
pub fn path(&self) -> &str
[src]
Get the path of this Uri
.
pub fn scheme(&self) -> Option<&str>
[src]
Get the scheme of this Uri
.
pub fn authority(&self) -> Option<&str>
[src]
Get the authority of this Uri
.
pub fn host(&self) -> Option<&str>
[src]
Get the host of this Uri
.
pub fn port(&self) -> Option<u16>
[src]
Get the port of this Uri
.
pub fn query(&self) -> Option<&str>
[src]
Get the query string of this Uri
, starting after the ?
.
pub fn is_absolute(&self) -> bool
[src]
Returns whether this URI is in absolute-form
.
An example of absolute form is https://hyper.rs
.
Trait Implementations
impl AsRef<str> for Uri
[src]
impl Clone for Uri
[src]
impl Debug for Uri
[src]
impl Default for Uri
[src]
impl Display for Uri
[src]
impl Eq for Uri
[src]
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>
[src]
impl Hash for Uri
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a> PartialEq<&'a str> for Uri
[src]
impl PartialEq<Uri> for Uri
[src]
impl<'a> PartialEq<Uri> for &'a str
[src]
impl PartialEq<str> for Uri
[src]
Auto Trait Implementations
impl RefUnwindSafe for Uri
impl Send for Uri
impl Sync for Uri
impl Unpin for Uri
impl UnwindSafe for Uri
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,