Enum domain::iana::opcode::Opcode [−][src]
pub enum Opcode { Query, IQuery, Status, Notify, Update, Int(u8), }
DNS OpCodes.
The opcode specifies the kind of query to be performed.
The opcode is initially defined in RFC 1035. All currently assigned values can be found at http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-5
Variants
Query
A standard query.
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) (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.
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.
NOTIFY queries allow master servers to inform slave servers when a zone has changed.
This value and the NOTIFY query are defined in RFC 1996.
Update
An UPDATE query.
The UPDATE query can be used to alter zone content managed by a master server.
This value and the UPDATE query are defined in RFC 2136.
Int(u8)
A raw integer opcode value.
When converting to an u8
, only the lower four bits are used.
Methods
impl Opcode
[src]
impl Opcode
pub fn from_int(value: u8) -> Opcode
[src]
pub fn from_int(value: u8) -> Opcode
Creates an Opcode value from an integer value.
Only considers the lower four bits of value
.
pub fn to_int(self) -> u8
[src]
pub fn to_int(self) -> u8
Returns the integer value for this opcode.
Trait Implementations
impl Clone for Opcode
[src]
impl Clone for Opcode
fn clone(&self) -> Opcode
[src]
fn clone(&self) -> Opcode
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for Opcode
[src]
impl Copy for Opcode
impl Debug for Opcode
[src]
impl Debug for Opcode
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<u8> for Opcode
[src]
impl From<u8> for Opcode
impl From<Opcode> for u8
[src]
impl From<Opcode> for u8
impl Display for Opcode
[src]
impl Display for Opcode
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Opcode
[src]
impl PartialEq for Opcode
fn eq(&self, other: &Opcode) -> bool
[src]
fn eq(&self, other: &Opcode) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl PartialEq<u8> for Opcode
[src]
impl PartialEq<u8> for Opcode
fn eq(&self, other: &u8) -> bool
[src]
fn eq(&self, other: &u8) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl PartialEq<Opcode> for u8
[src]
impl PartialEq<Opcode> for u8
fn eq(&self, other: &Opcode) -> bool
[src]
fn eq(&self, other: &Opcode) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for Opcode
[src]
impl Eq for Opcode
impl PartialOrd for Opcode
[src]
impl PartialOrd for Opcode
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialOrd<u8> for Opcode
[src]
impl PartialOrd<u8> for Opcode
fn partial_cmp(&self, other: &u8) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &u8) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialOrd<Opcode> for u8
[src]
impl PartialOrd<Opcode> for u8
fn partial_cmp(&self, other: &Opcode) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Opcode) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Opcode
[src]
impl Ord for Opcode
fn cmp(&self, other: &Self) -> Ordering
[src]
fn cmp(&self, other: &Self) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for Opcode
[src]
impl Hash for Opcode