Struct uriparse::authority::RegisteredName [−][src]
pub struct RegisteredName<'name>(_);
A host that is a registered name (i.e. not an IP literal).
The host is case-insensitive meaning that "example.com"
and "ExAmPlE.CoM"
refer to the same
host. Furthermore, percent-encoding plays no role in equality checking meaning that
"example.com"
and "exampl%65.com"
also refer to the same host. Both of these attributes are
reflected in the equality and hash functions.
However, be aware that just because percent-encoding plays no role in equality checking does not mean that the host is normalized. The original host string will always be preserved as is with no normalization performed.
Methods
impl<'name> RegisteredName<'name>
[src]
impl<'name> RegisteredName<'name>
pub fn as_str(&self) -> &str
[src]
pub fn as_str(&self) -> &str
pub fn into_owned(self) -> RegisteredName<'static>
[src]
pub fn into_owned(self) -> RegisteredName<'static>
Trait Implementations
impl<'name> Clone for RegisteredName<'name>
[src]
impl<'name> Clone for RegisteredName<'name>
fn clone(&self) -> RegisteredName<'name>
[src]
fn clone(&self) -> RegisteredName<'name>
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)
Performs copy-assignment from source
. Read more
impl<'name> Debug for RegisteredName<'name>
[src]
impl<'name> Debug for RegisteredName<'name>
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<'name> AsRef<[u8]> for RegisteredName<'name>
[src]
impl<'name> AsRef<[u8]> for RegisteredName<'name>
impl<'name> AsRef<str> for RegisteredName<'name>
[src]
impl<'name> AsRef<str> for RegisteredName<'name>
impl<'name> Display for RegisteredName<'name>
[src]
impl<'name> Display for RegisteredName<'name>
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<'name> Eq for RegisteredName<'name>
[src]
impl<'name> Eq for RegisteredName<'name>
impl<'name> From<RegisteredName<'name>> for String
[src]
impl<'name> From<RegisteredName<'name>> for String
fn from(value: RegisteredName<'name>) -> String
[src]
fn from(value: RegisteredName<'name>) -> String
Performs the conversion.
impl<'name> Hash for RegisteredName<'name>
[src]
impl<'name> Hash for RegisteredName<'name>
fn hash<H>(&self, state: &mut H) where
H: Hasher,
[src]
fn hash<H>(&self, state: &mut H) where
H: Hasher,
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,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'name> PartialEq for RegisteredName<'name>
[src]
impl<'name> PartialEq for RegisteredName<'name>
fn eq(&self, other: &RegisteredName) -> bool
[src]
fn eq(&self, other: &RegisteredName) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'name> PartialEq<[u8]> for RegisteredName<'name>
[src]
impl<'name> PartialEq<[u8]> for RegisteredName<'name>
fn eq(&self, other: &[u8]) -> bool
[src]
fn eq(&self, other: &[u8]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'name> PartialEq<RegisteredName<'name>> for [u8]
[src]
impl<'name> PartialEq<RegisteredName<'name>> for [u8]
fn eq(&self, other: &RegisteredName<'name>) -> bool
[src]
fn eq(&self, other: &RegisteredName<'name>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'name> PartialEq<&'a [u8]> for RegisteredName<'name>
[src]
impl<'a, 'name> PartialEq<&'a [u8]> for RegisteredName<'name>
fn eq(&self, other: &&'a [u8]) -> bool
[src]
fn eq(&self, other: &&'a [u8]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'name> PartialEq<RegisteredName<'name>> for &'a [u8]
[src]
impl<'a, 'name> PartialEq<RegisteredName<'name>> for &'a [u8]
fn eq(&self, other: &RegisteredName<'name>) -> bool
[src]
fn eq(&self, other: &RegisteredName<'name>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'name> PartialEq<str> for RegisteredName<'name>
[src]
impl<'name> PartialEq<str> for RegisteredName<'name>
fn eq(&self, other: &str) -> bool
[src]
fn eq(&self, other: &str) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'name> PartialEq<RegisteredName<'name>> for str
[src]
impl<'name> PartialEq<RegisteredName<'name>> for str
fn eq(&self, other: &RegisteredName<'name>) -> bool
[src]
fn eq(&self, other: &RegisteredName<'name>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'name> PartialEq<&'a str> for RegisteredName<'name>
[src]
impl<'a, 'name> PartialEq<&'a str> for RegisteredName<'name>
fn eq(&self, other: &&'a str) -> bool
[src]
fn eq(&self, other: &&'a str) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a, 'name> PartialEq<RegisteredName<'name>> for &'a str
[src]
impl<'a, 'name> PartialEq<RegisteredName<'name>> for &'a str
fn eq(&self, other: &RegisteredName<'name>) -> bool
[src]
fn eq(&self, other: &RegisteredName<'name>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'name> TryFrom<&'name [u8]> for RegisteredName<'name>
[src]
impl<'name> TryFrom<&'name [u8]> for RegisteredName<'name>
type Error = InvalidRegisteredName
try_from
)The type returned in the event of a conversion error.
fn try_from(value: &'name [u8]) -> Result<Self, Self::Error>
[src]
fn try_from(value: &'name [u8]) -> Result<Self, Self::Error>
try_from
)Performs the conversion.
impl<'name> TryFrom<&'name str> for RegisteredName<'name>
[src]
impl<'name> TryFrom<&'name str> for RegisteredName<'name>
Auto Trait Implementations
impl<'name> Send for RegisteredName<'name>
impl<'name> Send for RegisteredName<'name>
impl<'name> Sync for RegisteredName<'name>
impl<'name> Sync for RegisteredName<'name>