Struct dns_parser::Packet
source · [−]pub struct Packet<'a> {
pub header: Header,
pub questions: Vec<Question<'a>>,
pub answers: Vec<ResourceRecord<'a>>,
pub nameservers: Vec<ResourceRecord<'a>>,
pub additional: Vec<ResourceRecord<'a>>,
pub opt: Option<Record<'a>>,
}
Expand description
Parsed DNS packet
Fields
header: Header
questions: Vec<Question<'a>>
answers: Vec<ResourceRecord<'a>>
nameservers: Vec<ResourceRecord<'a>>
additional: Vec<ResourceRecord<'a>>
opt: Option<Record<'a>>
Optional Pseudo-RR
When present it is sent as an RR in the additional section. In this RR
the class
and ttl
fields store max udp packet size and flags
respectively. To keep ResourceRecord
clean we store the OPT record
here.
Implementations
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Packet<'a>
impl<'a> Send for Packet<'a>
impl<'a> Sync for Packet<'a>
impl<'a> Unpin for Packet<'a>
impl<'a> UnwindSafe for Packet<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more