[−][src]Struct http_req::uri::Authority
Authority of Uri
Example
use http_req::uri::Authority; let auth: Authority = "user:info@foo.com:443".parse().unwrap(); assert_eq!(auth.host(), "foo.com");
Implementations
impl Authority
[src]
pub fn username(&self) -> Option<&str>
[src]
Returns username of this Authority
Example
use http_req::uri::Authority; let auth: Authority = "user:info@foo.com:443".parse().unwrap(); assert_eq!(auth.username(), Some("user"));
pub fn password(&self) -> Option<&str>
[src]
Returns password of this Authority
Example
use http_req::uri::Authority; let auth: Authority = "user:info@foo.com:443".parse().unwrap(); assert_eq!(auth.password(), Some("info"));
pub fn user_info(&self) -> Option<&str>
[src]
Returns information about the user
Example
use http_req::uri::Authority; let auth: Authority = "user:info@foo.com:443".parse().unwrap(); assert_eq!(auth.user_info(), Some("user:info"));
pub fn host(&self) -> &str
[src]
Returns host of this Authority
Example
use http_req::uri::Authority; let auth: Authority = "user:info@foo.com:443".parse().unwrap(); assert_eq!(auth.host(), "foo.com");
pub fn port(&self) -> Option<u16>
[src]
Returns port of this Authority
Example
use http_req::uri::Authority; let auth: Authority = "user:info@foo.com:443".parse().unwrap(); assert_eq!(auth.port(), Some(443));
Trait Implementations
impl Clone for Authority
[src]
impl Debug for Authority
[src]
impl Display for Authority
[src]
impl FromStr for Authority
[src]
type Err = ParseErr
The associated error which can be returned from parsing.
pub fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl PartialEq<Authority> for Authority
[src]
impl StructuralPartialEq for Authority
[src]
Auto Trait Implementations
impl RefUnwindSafe for Authority
impl Send for Authority
impl Sync for Authority
impl Unpin for Authority
impl UnwindSafe for Authority
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,