Struct dns_parser::Packet [−][src]
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
impl<'a> Packet<'a>
[src]
pub fn parse(data: &[u8]) -> Result<Packet<'_>, Error>
[src]
Parse a full DNS Packet and return a structure that has all the data borrowed from the passed buffer.
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,