Struct trust_dns_proto::rr::domain::Label [−][src]
pub struct Label(_);
Expand description
Labels are always stored as ASCII, unicode characters must be encoded with punycode
Implementations
These must only be ASCII, with unicode encoded to PunyCode, or other such transformation.
This uses the bytes as raw ascii values, with nothing escaped on the wire.
Generally users should use from_str
or from_ascii
Translates this string into IDNA safe name, encoding to punycode as necessary.
Takes the ascii string and returns a new label.
This will return an Error if the label is not an ascii string
Converts this label to lowercase
Returns true if this label is the wildcard, ‘*’, label
Returns the raw bytes of the label, this is good for writing to the wire.
See Display
for presentation version (unescaped from punycode, etc)
Performs the equivalence operation disregarding case
compares with the other label, ignoring case
Performs the conversion to utf8 from IDNA as necessary, see fmt
for more details
Converts this label to safe ascii, escaping characters as necessary
If this is an IDNA, punycode, label, then the xn– prefix will be maintained as ascii
Trait Implementations
Convert this into Label
Convert this into Label
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Label
impl UnwindSafe for Label
Blanket Implementations
Mutably borrows from an owned value. Read more