Struct libdata::flow::Name
[−]
pub struct Name(pub String);
A DNS name.
It is kept in lower-case, for two reasons. One, some resolvels do case randomization
(eXAmplE.ORg
), which is probably some kind of security thing and fine by the RFCs, but ugly
to look at. Another, DNS names are case insensitive and this helps that.
Note
DNS names can contain non-valid utf8. But there's no way these get into this application,
so we simply use a string, not something like OsString
. Also, there are things like dots in
the middle of label, which is also legal, etc. We simply don't care about these right now (but
having the type allows us to care in the future).
Methods
impl Name
[src]
Trait Implementations
impl EndpointType for Name
[src]
impl Clone for Name
[src]
fn clone(&self) -> Name
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for Name
[src]
impl Eq for Name
[src]
impl Hash for Name
[src]
fn hash<__H: Hasher>(&self, __arg_0: &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
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq for Name
[src]
fn eq(&self, __arg_0: &Name) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Name) -> bool
This method tests for !=
.
impl Ord for Name
[src]
fn cmp(&self, __arg_0: &Name) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
ord_max_min
)Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
ord_max_min
)Compares and returns the minimum of two values. Read more
impl PartialOrd for Name
[src]
fn partial_cmp(&self, __arg_0: &Name) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Name) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Name) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Name) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Name) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<'de> Deserialize<'de> for Name
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more