Struct trust_dns_proto::rr::domain::Label[][src]

pub struct Label(_);

Labels are always stored as ASCII, unicode characters must be encoded with punycode

Methods

impl Label
[src]

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 lenght in bytes of this 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 equivelence 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

Writes this label to safe ascii, escaping characters as necessary

Trait Implementations

impl Clone for Label
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for Label
[src]

impl AsRef<[u8]> for Label
[src]

Performs the conversion.

impl Borrow<[u8]> for Label
[src]

Immutably borrows from an owned value. Read more

impl Display for Label
[src]

outputs characters in a safe string manner.

if the string is punycode, i.e. starts with xn--, otherwise it translates to a safe ascii string escaping characters as necessary.

impl Debug for Label
[src]

Formats the value using the given formatter. Read more

impl PartialEq<Label> for Label
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialOrd<Label> for Label
[src]

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for Label
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl Hash for Label
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<'a> IntoLabel for &'a Label
[src]

Convert this into Label

impl IntoLabel for Label
[src]

Convert this into Label

Auto Trait Implementations

impl Send for Label

impl Sync for Label