[][src]Struct rusty_dns::dns_packet::DnsQuestion

pub struct DnsQuestion {
    pub qname: String,
    pub qtype: u16,
    pub qclass: u16,
}

DNS Packet Question.

Fields

qname: String

The domain name for the resource record that is being queried for.

qtype: u16

The type of the resource record that is being queried for.

qclass: u16

The class of the resource record that is being queried for.

Implementations

impl DnsQuestion[src]

pub fn parse_dns_question(
    dns_packet_buf: &Vec<u8>,
    start: usize
) -> Result<(DnsQuestion, usize), String>
[src]

Parse an entry for the DNS packet question section from a raw dns packet.

pub fn parse_questions(
    dns_packet_buf: &Vec<u8>,
    header: &DnsHeader,
    start: usize
) -> Result<(Vec<DnsQuestion>, usize), String>
[src]

Parse the DNS question section from a raw dns packet.

pub fn serialize(
    &self,
    start: usize,
    domain_name_offsets: &mut HashMap<String, u16>
) -> Result<(Vec<u8>, usize), String>
[src]

Serialize the DNS question section into a DNS protocol conformant, network ready buffer.

Trait Implementations

impl Debug for DnsQuestion[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.