Enum toluol::DnsRcode[][src]

pub enum DnsRcode {
Show 20 variants NOERROR, FORMERR, SERVFAIL, NXDOMAIN, NOTIMP, REFUSED, YXDOMAIN, YXRRSET, NXRRSET, NOTAUTH, NOTZONE, DSOTYPENI, BADVERSBADSIG, BADKEY, BADTIME, BADMODE, BADNAME, BADALG, BADTRUNC, BADCOOKIE,
}
Expand description

Represents a DNS RCODE, including those introduced by EDNS. See here for further information.

Variants

NOERROR
FORMERR
SERVFAIL
NXDOMAIN
NOTIMP
REFUSED
YXDOMAIN
YXRRSET
NXRRSET
NOTAUTH
NOTZONE
DSOTYPENI
BADVERSBADSIG
BADKEY
BADTIME
BADMODE
BADNAME
BADALG
BADTRUNC
BADCOOKIE

Implementations

Encodes a DnsRcode as a byte (actually only the lower four bits are used). Note that for RCODEs BADVERSBADSIG and following only the lower four bits are encoded; the upper eight bits need to be encoded in an OPT record in the additional section of the DNS message.

Parses an encoded DnsRcode from a twelve bit value. If EDNS is used, the upper eight bits are stored in the OPT entry of the additional section and the lower four bits are stored in the DnsHeader. Returns an error if the given value does not represent a valid DNS RCODE.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.