Enum domain::base::iana::opcode::Opcode[][src]

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

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

impl Opcode[src]

pub fn from_int(value: u8) -> Self[src]

Returns a value from its raw integer value.

pub fn to_int(self) -> u8[src]

Returns the raw integer value for a value.

pub fn from_mnemonic(m: &[u8]) -> Option<Self>[src]

Returns a value from a well-defined mnemonic.

pub fn to_mnemonic(self) -> Option<&'static [u8]>[src]

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.

impl Opcode[src]

pub fn from_bytes(bytes: &[u8]) -> Option<Self>[src]

Trait Implementations

impl Clone for Opcode[src]

impl Compose for Opcode[src]

impl Copy for Opcode[src]

impl Debug for Opcode[src]

impl Display for Opcode[src]

impl Eq for Opcode[src]

impl From<u8> for Opcode[src]

impl FromStr for Opcode[src]

type Err = FromStrError

The associated error which can be returned from parsing.

impl Hash for Opcode[src]

impl Ord for Opcode[src]

impl<Ref: AsRef<[u8]>> Parse<Ref> for Opcode[src]

impl PartialEq<Opcode> for Opcode[src]

impl PartialEq<u8> for Opcode[src]

impl PartialOrd<Opcode> for Opcode[src]

impl PartialOrd<u8> for Opcode[src]

impl Scan for Opcode[src]

Auto Trait Implementations

impl RefUnwindSafe for Opcode

impl Send for Opcode

impl Sync for Opcode

impl Unpin for Opcode

impl UnwindSafe for Opcode

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<Source, Target> OctetsInto<Target> for Source where
    Target: OctetsFrom<Source>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,