pub struct Domain<B: SplitByteSlice> { /* 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: SplitByteSlice + Copy> Domain<B>
impl<B: SplitByteSlice + 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: SplitByteSlice + Copy> PartialEq<&str> for Domain<B>
impl<B: SplitByteSlice + 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.
impl<B: Eq + SplitByteSlice> Eq for Domain<B>
impl<B: SplitByteSlice> StructuralPartialEq for Domain<B>
Auto Trait Implementations§
impl<B> Freeze for Domain<B>
impl<B> RefUnwindSafe for Domain<B>where
B: RefUnwindSafe,
impl<B> Send for Domain<B>where
B: Send,
impl<B> Sync for Domain<B>where
B: Sync,
impl<B> Unpin for Domain<B>where
B: Unpin,
impl<B> UnwindSafe for Domain<B>where
B: UnwindSafe,
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