pub struct DnsIncoming { /* private fields */ }Expand description
An incoming DNS message. It could be a query or a response.
Implementations§
Source§impl DnsIncoming
impl DnsIncoming
pub fn new(data: Vec<u8>) -> Result<Self, Error>
pub fn id(&self) -> u16
pub fn questions(&self) -> &[DnsQuestion]
pub fn answers(&self) -> &[DnsRecordBox] ⓘ
pub fn additionals(&self) -> &[DnsRecordBox] ⓘ
pub fn answers_mut(&mut self) -> &mut Vec<DnsRecordBox> ⓘ
pub fn additionals_mut(&mut self) -> &mut Vec<DnsRecordBox> ⓘ
pub fn all_records(self) -> impl Iterator<Item = DnsRecordBox>
pub fn num_additionals(&self) -> u16
pub fn num_questions(&self) -> u16
pub const fn is_query(&self) -> bool
pub const fn is_response(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DnsIncoming
impl !RefUnwindSafe for DnsIncoming
impl !Send for DnsIncoming
impl !Sync for DnsIncoming
impl Unpin for DnsIncoming
impl !UnwindSafe for DnsIncoming
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