pub struct MdnsPacket<'a> { /* private fields */ }Expand description
mDNS packet wrapper. Internally delegates to DnsPacket since
mDNS uses the identical DNS wire format (RFC 6762 §18).
Implementations§
Source§impl<'a> MdnsPacket<'a>
impl<'a> MdnsPacket<'a>
pub fn new(buf: &'a [u8]) -> Option<Self>
pub fn is_query(&self) -> bool
pub fn is_response(&self) -> bool
Sourcepub fn unicast_response_requested(&self) -> bool
pub fn unicast_response_requested(&self) -> bool
The unicast-response (QU) bit in the first question’s class field. When set, responders should send a unicast reply (RFC 6762 §5.4).
pub fn questions(&self) -> DnsQuestionIter<'a> ⓘ
pub fn answers(&self) -> DnsRecordIter<'a> ⓘ
pub fn additionals(&self) -> DnsRecordIter<'a> ⓘ
Trait Implementations§
Source§impl<'a> Clone for MdnsPacket<'a>
impl<'a> Clone for MdnsPacket<'a>
Source§fn clone(&self) -> MdnsPacket<'a>
fn clone(&self) -> MdnsPacket<'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 moreSource§impl<'a> Debug for MdnsPacket<'a>
impl<'a> Debug for MdnsPacket<'a>
Source§impl<'a> From<MdnsPacket<'a>> for AppPacket<'a>
impl<'a> From<MdnsPacket<'a>> for AppPacket<'a>
Source§fn from(p: MdnsPacket<'a>) -> Self
fn from(p: MdnsPacket<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for MdnsPacket<'a>
impl<'a> RefUnwindSafe for MdnsPacket<'a>
impl<'a> Send for MdnsPacket<'a>
impl<'a> Sync for MdnsPacket<'a>
impl<'a> Unpin for MdnsPacket<'a>
impl<'a> UnsafeUnpin for MdnsPacket<'a>
impl<'a> UnwindSafe for MdnsPacket<'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