Enum domain::iana::rcode::Rcode [−][src]
pub enum Rcode { NoError, FormErr, ServFail, NXDomain, NotImp, Refused, YXDomain, YXRRSet, NXRRSet, NotAuth, NotZone, Int(u8), }
DNS Response Codes.
The response code of a response indicates what happend on the server when trying to answer the query. The code is a 4 bit value and part of the header of a DNS message.
This response was defined as part of RFC 1035. Later, RFC 2671 defined an extended response code of 12 bits using the lower four bits from the header and eight additional bits stored in the OPT pseudo-record. The type OptRcode represents this extended response code. A third response code, now 16 bit wide, was defined for the transaction authentication mechansim (TSIG) in [RFC 2845] and is represented by TsigRcode.
All three codes share the same name space. Their values are defined in one registry, IANA DNS RCODEs.
Variants
NoError
FormErr
ServFail
Server failure.
The name server was unable to process this query due to a problem with the name server.
Defined in RFC 1035.
NXDomain
Name error.
The domain name given in the query does not exist at the name server.
Defined in RFC 1035.
NotImp
Refused
Query refused.
The name server refused to perform the operation requested by the query for policy reasons.
Defined in RFC 1035.
YXDomain
Name exists when it should not.
Returned for an UPDATE query when a domain requested to not exist does in fact exist.
Returned when resolving a DNAME redirection when the resulting name exceeds the length of 255 octets.
Defined in RFC 2136 for the UPDATE query and RFC 6672 for DNAME redirection.
YXRRSet
RR set exists when it should not.
Returned for an UPDATE query when an RRset requested to not exist does in fact exist.
Defined in RFC 2136.
NXRRSet
RR set that should exist does not.
Returned for an UPDATE query when an RRset requested to exist does not.
Defined in RFC 2136.
NotAuth
Server not authoritative for zone or client not authorized.
Returned for an UPDATE query when the server is not an authoritative name server for the requested domain.
Returned for queries using TSIG when authorisation failed.
NotZone
Name not contained in zone.
A name used in the prerequisite or update section is not within the zone given in the zone section.
Defined in RFC 2136.
Int(u8)
A raw, integer rcode value.
When converting to an u8
, only the lower four bits are used.
Methods
impl Rcode
[src]
impl Rcode
pub fn from_int(value: u8) -> Rcode
[src]
pub fn from_int(value: u8) -> Rcode
Creates an rcode from an integer.
Only the lower four bits of value
are considered.
pub fn to_int(self) -> u8
[src]
pub fn to_int(self) -> u8
Returns the integer value for this rcode.
Trait Implementations
impl Clone for Rcode
[src]
impl Clone for Rcode
fn clone(&self) -> Rcode
[src]
fn clone(&self) -> Rcode
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 Rcode
[src]
impl Copy for Rcode
impl Debug for Rcode
[src]
impl Debug for Rcode
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 Rcode
[src]
impl From<u8> for Rcode
impl From<Rcode> for u8
[src]
impl From<Rcode> for u8
impl Display for Rcode
[src]
impl Display for Rcode
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 Rcode
[src]
impl PartialEq for Rcode
fn eq(&self, other: &Rcode) -> bool
[src]
fn eq(&self, other: &Rcode) -> 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 Rcode
[src]
impl PartialEq<u8> for Rcode
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<Rcode> for u8
[src]
impl PartialEq<Rcode> for u8
fn eq(&self, other: &Rcode) -> bool
[src]
fn eq(&self, other: &Rcode) -> 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 Rcode
[src]
impl Eq for Rcode
impl PartialOrd for Rcode
[src]
impl PartialOrd for Rcode
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 Rcode
[src]
impl PartialOrd<u8> for Rcode
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<Rcode> for u8
[src]
impl PartialOrd<Rcode> for u8
fn partial_cmp(&self, other: &Rcode) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Rcode) -> 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 Rcode
[src]
impl Ord for Rcode
fn cmp(&self, other: &Rcode) -> Ordering
[src]
fn cmp(&self, other: &Rcode) -> 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 Rcode
[src]
impl Hash for Rcode
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash<H: Hasher>(&self, state: &mut H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl From<Rcode> for OptRcode
[src]
impl From<Rcode> for OptRcode
impl From<Rcode> for TsigRcode
[src]
impl From<Rcode> for TsigRcode
impl From<Rcode> for Error
[src]
impl From<Rcode> for Error