pub enum Opcode {
    Query,
    IQuery,
    Status,
    Notify,
    Update,
    Dso,
    Int(u8),
}
Expand description

DNS OpCodes.

The opcode specifies the kind of query to be performed.

The opcode and its initial set of values are defined in RFC 1035. Additional values have been defined over time. All currently assigned values can be found in the IANA registry. This type is complete as of 2019-12-23.

Variants

Query

A standard query (0).

This query requests all records matching the name, class, and record type given in the query’s question section.

This value is defined in RFC 1035.

IQuery

An inverse query (IQUERY) (1, obsolete).

The idea behind inverse queries was to provide a single answer and ask the DNS for all the questions that would lead to this answer. This kind of query has always been optional, was never widely supported, and has therefore been declared obsolete.

This value was defined in RFC 1035 and obsoleted by RFC 3425.

Status

A server status request (2).

This value is defined in RFC 1035. The status request itself was defined as experimental and ‘to be defined’ in RFC 1034 and seems to never have been mentioned ever again.

Notify

A NOTIFY query (4).

NOTIFY queries allow primary servers to inform secondary servers when a zone has changed.

This value and the NOTIFY query are defined in RFC 1996.

Update

An UPDATE query (5).

The UPDATE query can be used to alter zone content managed by an authoritative server.

This value and the UPDATE query are defined in RFC 2136.

Dso

DNS Stateful operations (DSO) (6).

The DSO query can be used to manage stateful sessions between two DNS endpoints.

This value and the DOS query are defined in RFC 8490.

Int(u8)

A raw value given through its integer.

Implementations

Returns a value from its raw integer value.

Returns the raw integer value for a value.

Returns a value from a well-defined mnemonic.

Returns the mnemonic for this value if there is one.

This will also return a mnemonic if a well-defined variant is hidden in a Int variant.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Appends the concrete representation of the value to the target. Read more

Appends the canonical representation of the value to the target. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

Extracts a value from the beginning of parser. Read more

Skips over a value of this type at the beginning of parser. Read more

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Available on crate feature master only.

Scans a value from a master file.

Serialize this value into the given Serde serializer. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Performs the conversion.

The resulting type after obtaining ownership.

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

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.