pub enum LabelSegment<'a> {
Empty,
String(&'a str),
Pointer(u16),
}
Expand description
A DNS-compatible label segment.
Variants§
Empty
The empty terminator.
String(&'a str)
A string label.
Pointer(u16)
A pointer to a previous name.
Trait Implementations§
Source§impl<'a> Clone for LabelSegment<'a>
impl<'a> Clone for LabelSegment<'a>
Source§fn clone(&self) -> LabelSegment<'a>
fn clone(&self) -> LabelSegment<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for LabelSegment<'a>
impl<'a> Debug for LabelSegment<'a>
Source§impl Default for LabelSegment<'_>
impl Default for LabelSegment<'_>
Source§impl<'a> Hash for LabelSegment<'a>
impl<'a> Hash for LabelSegment<'a>
Source§impl<'a> Ord for LabelSegment<'a>
impl<'a> Ord for LabelSegment<'a>
Source§fn cmp(&self, other: &LabelSegment<'a>) -> Ordering
fn cmp(&self, other: &LabelSegment<'a>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialEq for LabelSegment<'a>
impl<'a> PartialEq for LabelSegment<'a>
Source§impl<'a> PartialOrd for LabelSegment<'a>
impl<'a> PartialOrd for LabelSegment<'a>
impl<'a> Copy for LabelSegment<'a>
impl<'a> Eq for LabelSegment<'a>
impl<'a> StructuralPartialEq for LabelSegment<'a>
Auto Trait Implementations§
impl<'a> Freeze for LabelSegment<'a>
impl<'a> RefUnwindSafe for LabelSegment<'a>
impl<'a> Send for LabelSegment<'a>
impl<'a> Sync for LabelSegment<'a>
impl<'a> Unpin for LabelSegment<'a>
impl<'a> UnwindSafe for LabelSegment<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more