Struct toluol::DnsQuestion[][src]

pub struct DnsQuestion {
    pub qname: String,
    pub qtype: DnsType,
    pub qclass: DnsClass,
}
Expand description

Represents a DNS question, i.e. an entry in the question section of a DNS message. See RFC 1035 for further information.

Fields

qname: Stringqtype: DnsTypeqclass: DnsClass

Implementations

Creates a DNS question.

Encodes a DnsQuestion as a series of bytes. Returns an error if a method defined in byteorder::WriteBytesExt returns an error.

Parses an encoded DnsQuestion from a series of bytes. Returns an error if DnsMessage::parse_qname(), DnsType::parse(), DnsClass::parse() or a method defined in byteorder::ReadBytesExt return an error.

Returns a string representing the record in the canonical format, with the owner padded to the given length.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.