Enum trust_dns_proto::op::response_code::ResponseCode [−][src]
pub enum ResponseCode {
NoError,
FormErr,
ServFail,
NXDomain,
NotImp,
Refused,
YXDomain,
YXRRSet,
NXRRSet,
NotAuth,
NotZone,
BADVERS,
BADSIG,
BADKEY,
BADTIME,
BADMODE,
BADNAME,
BADALG,
BADTRUNC,
BADCOOKIE,
}The status code of the response to a query.
RFC 1035, DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION, November 1987
RCODE Response code - this 4 bit field is set as part of
responses. The values have the following
interpretation:
0 No error condition
1 Format error - The name server was
unable to interpret the query.
2 Server failure - The name server was
unable to process this query due to a
problem with the name server.
3 Name Error - Meaningful only for
responses from an authoritative name
server, this code signifies that the
domain name referenced in the query does
not exist.
4 Not Implemented - The name server does
not support the requested kind of query.
5 Refused - The name server refuses to
perform the specified operation for
policy reasons. For example, a name
server may not wish to provide the
information to the particular requester,
or a name server may not wish to perform
a particular operation (e.g., zone
transfer) for particular data.
6-15 Reserved for future use.
Variants
NoErrorNo Error RFC 1035
FormErrFormat Error RFC 1035
ServFailServer Failure RFC 1035
NXDomainNon-Esistent Domain RFC 1035
NotImpNot Implemented RFC 1035
RefusedQuery Refused RFC 1035
YXDomainName Exists when it should not RFC 2136
YXRRSetRR Set Exists when it should not RFC 2136
NXRRSetRR Set that should exist does not RFC 2136
NotAuthNotZoneName not contained in zone RFC 2136
BADVERSBad OPT Version RFC 6891
BADSIGTSIG Signature Failure RFC 2845
BADKEYKey not recognized RFC 2845
BADTIMESignature out of time window RFC 2845
BADMODEBad TKEY Mode RFC 2930
BADNAMEDuplicate key name RFC 2930
BADALGAlgorithm not supported RFC 2930
BADTRUNCBad Truncation RFC 4635
BADCOOKIEBad/missing server cookie draft-ietf-dnsop-cookies
Methods
impl ResponseCode[src]
impl ResponseCodepub fn low(&self) -> u8[src]
pub fn low(&self) -> u8returns the lower 4 bits of the response code (for the original header portion of the code)
pub fn high(&self) -> u16[src]
pub fn high(&self) -> u16returns the high 12 bits for the edns portion of the response code
pub fn from(high: u8, low: u8) -> ResponseCode[src]
pub fn from(high: u8, low: u8) -> ResponseCodeCombines the EDNS high and low from the Header to produce the Extended ResponseCode
pub fn to_str(&self) -> &'static str[src]
pub fn to_str(&self) -> &'static strTransforms the response code into the human message
Trait Implementations
impl Debug for ResponseCode[src]
impl Debug for ResponseCodefn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for ResponseCode[src]
impl PartialEq for ResponseCodefn eq(&self, other: &ResponseCode) -> bool[src]
fn eq(&self, other: &ResponseCode) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl PartialOrd for ResponseCode[src]
impl PartialOrd for ResponseCodefn partial_cmp(&self, other: &ResponseCode) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &ResponseCode) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Rhs) -> bool1.0.0[src]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Copy for ResponseCode[src]
impl Copy for ResponseCodeimpl Clone for ResponseCode[src]
impl Clone for ResponseCodefn clone(&self) -> ResponseCode[src]
fn clone(&self) -> ResponseCodeReturns 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 Display for ResponseCode[src]
impl Display for ResponseCodefn fmt(&self, f: &mut Formatter) -> Result<(), Error>[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>Formats the value using the given formatter. Read more
impl From<ResponseCode> for u16[src]
impl From<ResponseCode> for u16Convert from ResponseCode to u16
use std::convert::From; use trust_dns_proto::op::response_code::ResponseCode; let var: ResponseCode = From::from(0); assert_eq!(ResponseCode::NoError, var); let var: ResponseCode = 0.into(); assert_eq!(ResponseCode::NoError, var);
fn from(rt: ResponseCode) -> Self[src]
fn from(rt: ResponseCode) -> SelfPerforms the conversion.
impl From<u16> for ResponseCode[src]
impl From<u16> for ResponseCodeConvert from u16 to ResponseCode
use std::convert::From; use trust_dns_proto::op::response_code::ResponseCode; let var: u16 = From::from(ResponseCode::NoError); assert_eq!(0, var); let var: u16 = ResponseCode::NoError.into(); assert_eq!(0, var);
Auto Trait Implementations
impl Send for ResponseCode
impl Send for ResponseCodeimpl Sync for ResponseCode
impl Sync for ResponseCode