[−][src]Struct domain::base::name::OwnedLabel
An owned label.
Since labels are relatively short, this type doesn’t actually allocate any memory but is a 64 octet array.
Implementations
impl OwnedLabel
[src]
pub fn from_label(label: &Label) -> Self
[src]
Creates a new owned label from an existing label.
pub fn make_canonical(&mut self)
[src]
Converts the label into the canonical form.
This form has all octets representing ASCII letters converted to their lower case form.
pub fn as_label(&self) -> &Label
[src]
Returns a reference to the label.
pub fn as_label_mut(&mut self) -> &mut Label
[src]
Returns a mutable reference to the label.
pub fn as_wire_slice(&self) -> &[u8]
[src]
Returns a slice that is the wire-representation of the label.
Methods from Deref<Target = Label>
pub fn as_slice(&self) -> &[u8]
[src]
Returns a reference to the underlying octets slice.
pub fn as_slice_mut(&mut self) -> &mut [u8]
[src]
Returns a mutable reference to the underlying octets slice.
pub fn to_canonical(&self) -> OwnedLabel
[src]
Returns the label in canonical form.
In this form, all ASCII letters are lowercase.
pub fn composed_cmp(&self, other: &Self) -> Ordering
[src]
Returns the composed label ordering.
pub fn lowercase_composed_cmp(&self, other: &Self) -> Ordering
[src]
Returns the composed ordering with ASCII letters lowercased.
pub fn build<Builder: OctetsBuilder>(
&self,
target: &mut Builder
) -> Result<(), ShortBuf>
[src]
&self,
target: &mut Builder
) -> Result<(), ShortBuf>
Appends the label to an octets builder.
The method builds the encoded form of the label that starts with a one octet length indicator.
pub fn build_lowercase<Builder: OctetsBuilder>(
&self,
target: &mut Builder
) -> Result<(), ShortBuf>
[src]
&self,
target: &mut Builder
) -> Result<(), ShortBuf>
Appends the lowercased label to an octets builder.
The method builds the encoded form of the label that starts with a one octet length indicator. It also converts all ASCII letters into their lowercase form.
pub fn is_root(&self) -> bool
[src]
Returns whether the label is the root label.
pub fn is_wildcard(&self) -> bool
[src]
Returns whether the label is the wildcard label.
pub fn compose_len(&self) -> usize
[src]
Returns the length of the composed version of the label.
This length is one more than the length of the label as their is a leading length octet.
Trait Implementations
impl AsMut<[u8]> for OwnedLabel
[src]
impl AsMut<Label> for OwnedLabel
[src]
impl AsRef<[u8]> for OwnedLabel
[src]
impl AsRef<Label> for OwnedLabel
[src]
impl Borrow<Label> for OwnedLabel
[src]
impl BorrowMut<Label> for OwnedLabel
[src]
fn borrow_mut(&mut self) -> &mut Label
[src]
impl Deref for OwnedLabel
[src]
impl DerefMut for OwnedLabel
[src]
impl Eq for OwnedLabel
[src]
impl<'a> From<&'a Label> for OwnedLabel
[src]
impl Hash for OwnedLabel
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for OwnedLabel
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T: AsRef<Label>> PartialEq<T> for OwnedLabel
[src]
impl<T: AsRef<Label>> PartialOrd<T> for OwnedLabel
[src]
Auto Trait Implementations
impl RefUnwindSafe for OwnedLabel
impl Send for OwnedLabel
impl Sync for OwnedLabel
impl Unpin for OwnedLabel
impl UnwindSafe for OwnedLabel
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,