Struct uriparse::authority::Authority [−][src]
pub struct Authority<'authority> { /* fields omitted */ }
Methods
impl<'authority> Authority<'authority>
[src]
impl<'authority> Authority<'authority>
pub fn from_parts<'new_authority, UsernameType, PasswordType, HostType, UsernameError, PasswordError, HostError>(
username: Option<UsernameType>,
password: Option<PasswordType>,
host: HostType,
port: Option<u16>
) -> Result<Authority<'new_authority>, InvalidAuthority> where
Username<'new_authority>: TryFrom<UsernameType, Error = UsernameError>,
Password<'new_authority>: TryFrom<PasswordType, Error = PasswordError>,
Host<'new_authority>: TryFrom<HostType, Error = HostError>,
InvalidAuthority: From<UsernameError> + From<PasswordError> + From<HostError>,
[src]
pub fn from_parts<'new_authority, UsernameType, PasswordType, HostType, UsernameError, PasswordError, HostError>(
username: Option<UsernameType>,
password: Option<PasswordType>,
host: HostType,
port: Option<u16>
) -> Result<Authority<'new_authority>, InvalidAuthority> where
Username<'new_authority>: TryFrom<UsernameType, Error = UsernameError>,
Password<'new_authority>: TryFrom<PasswordType, Error = PasswordError>,
Host<'new_authority>: TryFrom<HostType, Error = HostError>,
InvalidAuthority: From<UsernameError> + From<PasswordError> + From<HostError>,
pub fn has_password(&self) -> bool
[src]
pub fn has_password(&self) -> bool
pub fn has_username(&self) -> bool
[src]
pub fn has_username(&self) -> bool
pub fn host(&self) -> &Host<'authority>
[src]
pub fn host(&self) -> &Host<'authority>
pub fn into_owned(self) -> Authority<'static>
[src]
pub fn into_owned(self) -> Authority<'static>
pub fn into_parts(
self
) -> (Option<Username<'authority>>, Option<Password<'authority>>, Host<'authority>, Option<u16>)
[src]
pub fn into_parts(
self
) -> (Option<Username<'authority>>, Option<Password<'authority>>, Host<'authority>, Option<u16>)
pub fn password(&self) -> Option<&Password<'authority>>
[src]
pub fn password(&self) -> Option<&Password<'authority>>
pub fn port(&self) -> Option<u16>
[src]
pub fn port(&self) -> Option<u16>
pub fn username(&self) -> Option<&Username<'authority>>
[src]
pub fn username(&self) -> Option<&Username<'authority>>
Trait Implementations
impl<'authority> Clone for Authority<'authority>
[src]
impl<'authority> Clone for Authority<'authority>
fn clone(&self) -> Authority<'authority>
[src]
fn clone(&self) -> Authority<'authority>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<'authority> Debug for Authority<'authority>
[src]
impl<'authority> Debug for Authority<'authority>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'authority> Eq for Authority<'authority>
[src]
impl<'authority> Eq for Authority<'authority>
impl<'authority> Hash for Authority<'authority>
[src]
impl<'authority> Hash for Authority<'authority>
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &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[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
[src]Feeds a slice of this type into the given [Hasher
]. Read more
impl<'authority> PartialEq for Authority<'authority>
[src]
impl<'authority> PartialEq for Authority<'authority>
fn eq(&self, other: &Authority<'authority>) -> bool
[src]
fn eq(&self, other: &Authority<'authority>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Authority<'authority>) -> bool
[src]
fn ne(&self, other: &Authority<'authority>) -> bool
This method tests for !=
.
impl<'authority> Display for Authority<'authority>
[src]
impl<'authority> Display for Authority<'authority>
fn fmt(&self, formatter: &mut Formatter) -> Result
[src]
fn fmt(&self, formatter: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'authority> From<Authority<'authority>> for String
[src]
impl<'authority> From<Authority<'authority>> for String
impl<'authority> TryFrom<&'authority [u8]> for Authority<'authority>
[src]
impl<'authority> TryFrom<&'authority [u8]> for Authority<'authority>
type Error = InvalidAuthority
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: &'authority [u8]) -> Result<Self, Self::Error>
[src]
fn try_from(value: &'authority [u8]) -> Result<Self, Self::Error>
🔬 This is a nightly-only experimental API. (
try_from
)Performs the conversion.
impl<'authority> TryFrom<&'authority str> for Authority<'authority>
[src]
impl<'authority> TryFrom<&'authority str> for Authority<'authority>