Enum trust_dns_proto::op::response_code::ResponseCode [−][src]
pub enum ResponseCode {
Show 21 variants
NoError,
FormErr,
ServFail,
NXDomain,
NotImp,
Refused,
YXDomain,
YXRRSet,
NXRRSet,
NotAuth,
NotZone,
BADVERS,
BADSIG,
BADKEY,
BADTIME,
BADMODE,
BADNAME,
BADALG,
BADTRUNC,
BADCOOKIE,
Unknown(u16),
}
Expand description
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
No Error RFC 1035
Format Error RFC 1035
Server Failure RFC 1035
Non-Existent Domain RFC 1035
Not Implemented RFC 1035
Query Refused RFC 1035
Name Exists when it should not RFC 2136
RR Set Exists when it should not RFC 2136
RR Set that should exist does not RFC 2136
Name not contained in zone RFC 2136
Bad OPT Version RFC 6891
TSIG Signature Failure RFC 2845
Key not recognized RFC 2845
Signature out of time window RFC 2845
Bad TKEY Mode RFC 2930
Duplicate key name RFC 2930
Algorithm not supported RFC 2930
Bad Truncation RFC 4635
Bad/missing server cookie draft-ietf-dnsop-cookies
Unknown(u16)
An unknown or unregisterd response code was received.
Tuple Fields of Unknown
0: u16
Implementations
returns the lower 4 bits of the response code (for the original header portion of the code)
DNS can not store the entire space of ResponseCodes in 4 bit space of the Header, this function allows for a initial value of the first 4 bits to be set.
After the EDNS is read, the entire ResponseCode (12 bits) can be reconstructed for the full ResponseCode.
Combines the EDNS high and low from the Header to produce the Extended ResponseCode
Trait Implementations
Convert 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);
Performs the conversion.
Convert 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);
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
Auto Trait Implementations
impl RefUnwindSafe for ResponseCode
impl Send for ResponseCode
impl Sync for ResponseCode
impl Unpin for ResponseCode
impl UnwindSafe for ResponseCode
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more