[−][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][+]
impl Hash for Uri
[src][+]
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,
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,
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>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,