pub struct Domain<B: ByteSlice> { /* private fields */ }
Expand description
A parsed mDNS domain. There is no need to worry about message compression when comparing against a string, and can be treated as a contiguous domain.
Implementations§
source§impl<B: ByteSlice + Copy> Domain<B>
impl<B: ByteSlice + Copy> Domain<B>
sourcepub fn parse<BV: BufferView<B>>(
buffer: &mut BV,
parent: Option<B>
) -> Result<Self, ParseError>
pub fn parse<BV: BufferView<B>>( buffer: &mut BV, parent: Option<B> ) -> Result<Self, ParseError>
Parse the provided record.
parent
is used for resolving compressed names as specified by RFC
1035 Section 4.1.4. If parent
is None, a reference to previous data
will be treated as an error.
Trait Implementations§
source§impl<B: ByteSlice + Copy> PartialEq<&str> for Domain<B>
impl<B: ByteSlice + Copy> PartialEq<&str> for Domain<B>
Implementation of PartialEq to make it possible to compare a parsed domain with the initial string that was used to construct it.
source§impl<B: PartialEq + ByteSlice> PartialEq for Domain<B>
impl<B: PartialEq + ByteSlice> PartialEq for Domain<B>
impl<B: Eq + ByteSlice> Eq for Domain<B>
impl<B: ByteSlice> StructuralPartialEq for Domain<B>
Auto Trait Implementations§
impl<B> Freeze for Domain<B>
impl<B> RefUnwindSafe for Domain<B>
impl<B> Send for Domain<B>
impl<B> Sync for Domain<B>
impl<B> Unpin for Domain<B>
impl<B> UnwindSafe for Domain<B>
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