Enum domain::bits::name::Labelette[][src]

pub enum Labelette<'a> {
    Normal(&'a [u8]),
    Bit(bool),
}

A labelette is an atomic label.

Various operations on domain names such as comparisons or ordering are done label by label. However, binary labels are actually a sequence of labels themselves. Worse, a binary label within a name can actually be broken up into several binary labels with the same overall number of bits while still retaining the same domain name. All these operations need to consider the individual bits labels of a binary label.

In order to disperse the confusion of having labels inside labels, we invented the term labelette exclusively for this crate to mean either a normal label or one single bit-label of a binary label.

You get labelettes by iterating over Labels. For a normal label, this iterator will return exactly once with a Normal variant. For binary labels, the iterator will return once for each bit label with the Bit variant.

Variants

A labelette for a normal label.

A labelette for a single bit-label of a binary label.

Methods

impl<'a> Labelette<'a>
[src]

Returns whether the labelette is the root label.

Trait Implementations

impl<'a> PartialEq for Labelette<'a>
[src]

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

This method tests for !=.

impl<'a> Eq for Labelette<'a>
[src]

impl<'a> PartialOrd for Labelette<'a>
[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<'a> Ord for Labelette<'a>
[src]

Returns the ordering between self and other.

The canonical sort order for labels is defined in section 6.1 of RFC 4034, that for binary labels in section 3.3 of RFC 2673.

In short, normal labels are ordered like octet strings except that the case of ASCII letters is ignored. Bit labels sort before normal labels and false sorts before true.

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl<'a> Hash for Labelette<'a>
[src]

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

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

impl<'a> Debug for Labelette<'a>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> Send for Labelette<'a>

impl<'a> Sync for Labelette<'a>