[−][src]Struct http_req::uri::Uri
Representation of Uniform Resource Identifier
Example
use http_req::uri::Uri; let uri: Uri = "https://user:info@foo.com:12/bar/baz?query#fragment".parse().unwrap(); assert_eq!(uri.host(), Some("foo.com"));
Methods
impl Uri
[src]
pub fn scheme(&self) -> &str
[src]
Returns scheme of this Uri
.
pub fn user_info(&self) -> Option<String>
[src]
Returns information about the user included in this Uri
.
pub fn host(&self) -> Option<&str>
[src]
Returns host of this Uri
.
pub fn port(&self) -> &Option<u16>
[src]
Returns port of this Uri
pub fn corr_port(&self) -> u16
[src]
Returns port corresponding to this Uri
.
Returns default port if it hasn't been set in the uri.
pub fn path(&self) -> Option<&str>
[src]
Returns path of this Uri
.
pub fn query(&self) -> Option<&str>
[src]
Returns query of this Uri
.
pub fn fragment(&self) -> Option<&str>
[src]
Returns fragment of this Uri
.
pub fn resource(&self) -> String
[src]
Returns resource Uri
points to.
Trait Implementations
impl PartialEq<Uri> for Uri
[src]
impl Clone for Uri
[src]
fn clone(&self) -> Uri
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Display for Uri
[src]
impl Debug for Uri
[src]
impl FromStr for Uri
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into 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> From for T
[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,