[−][src]Struct rusty_dns::dns_packet::DnsPacket
DNS Packet.
Fields
header: DnsHeader
DNS Header for the DNS packet.
question: Vec<DnsQuestion>
DNS Question section for the DNS packet.
answer: Vec<DnsResourceRecord>
DNS Answer section for the DNS packet.
DNS Authority section for the DNS packet.
additional: Vec<DnsResourceRecord>
DNS Additonal section for the DNS packet.
Implementations
impl DnsPacket
[src]
pub fn new(
domain_name: &String,
resource_record_type: u16
) -> Result<DnsPacket, String>
[src]
domain_name: &String,
resource_record_type: u16
) -> Result<DnsPacket, String>
pub fn parse_dns_packet(dns_packet_buf: &Vec<u8>) -> Result<DnsPacket, String>
[src]
Parse a DNS packet from a raw DNS packet.
pub fn serialize(&self) -> Result<Vec<u8>, String>
[src]
Serialize the DNS packet into a DNS protocol conformant, network ready buffer.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DnsPacket
impl Send for DnsPacket
impl Sync for DnsPacket
impl Unpin for DnsPacket
impl UnwindSafe for DnsPacket
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,