pub struct DnsPacket<'a> {
pub header: DnsHeader,
pub questions: Vec<Question<'a>>,
pub answers: Vec<ResourceRecord<'a>>,
pub authority: Vec<ResourceRecord<'a>>,
pub additional: Vec<ResourceRecord<'a>>,
}Expand description
Represents a complete DNS packet.
A DNS packet has the following sections in order:
+---------------------+
| Header |
+---------------------+
| Question | the question(s) for the name server
+---------------------+
| Answer | RRs answering the question
+---------------------+
| Authority | RRs pointing toward an authority
+---------------------+
| Additional | RRs holding additional information
+---------------------+For the header the DnsHeader type is used. For the rest, Questions are represented with the Question type, and RRs with the ResourceRecord type.
Fields§
§header: DnsHeaderThe DNS Header
questions: Vec<Question<'a>>The question(s) for the name server
answers: Vec<ResourceRecord<'a>>Resource Records answering the question(s)
Resource Records pointing toward a domain authority
additional: Vec<ResourceRecord<'a>>Resource Records holding additional information
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for DnsPacket<'a>
impl<'a> RefUnwindSafe for DnsPacket<'a>
impl<'a> Send for DnsPacket<'a>
impl<'a> Sync for DnsPacket<'a>
impl<'a> Unpin for DnsPacket<'a>
impl<'a> UnwindSafe for DnsPacket<'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