pub struct MessageReader<'a> { /* private fields */ }Expand description
Borrowed view over a parsed mDNS message. Lazy iteration; nothing is allocated.
Implementations§
Source§impl<'a> MessageReader<'a>
impl<'a> MessageReader<'a>
Sourcepub fn try_parse(message: &'a [u8]) -> Result<MessageReader<'a>, ParseError>
pub fn try_parse(message: &'a [u8]) -> Result<MessageReader<'a>, ParseError>
Parses just the header; sections are walked on demand via the iterator methods.
Iterator over the authority section (NS records, used in mDNS probes). Walks past the questions and answer sections to locate authority records.
Sourcepub fn additional(&self) -> Records<'a> ⓘ
pub fn additional(&self) -> Records<'a> ⓘ
Iterator over the additional section. Standard DNS-SD responders place the SRV/TXT/A/AAAA records that accompany a PTR answer here (RFC 6763 §12), so a querier MUST process them to complete discovery. Walks past the questions, answer, and authority sections.
Trait Implementations§
Source§impl<'a> Clone for MessageReader<'a>
impl<'a> Clone for MessageReader<'a>
Source§fn clone(&self) -> MessageReader<'a>
fn clone(&self) -> MessageReader<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for MessageReader<'a>
Auto Trait Implementations§
impl<'a> Freeze for MessageReader<'a>
impl<'a> RefUnwindSafe for MessageReader<'a>
impl<'a> Send for MessageReader<'a>
impl<'a> Sync for MessageReader<'a>
impl<'a> Unpin for MessageReader<'a>
impl<'a> UnsafeUnpin for MessageReader<'a>
impl<'a> UnwindSafe for MessageReader<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more