#[non_exhaustive]#[repr(u16)]pub enum ResponseCode {
Show 20 variants
NoError = 0,
FormatError = 1,
ServerFailure = 2,
NameError = 3,
NotImplemented = 4,
Refused = 5,
YxDomain = 6,
YxRrSet = 7,
NxRrSet = 8,
NotAuth = 9,
NotZone = 10,
DsoTypeNi = 11,
BadVers = 16,
BadKey = 17,
BadTime = 18,
BadMode = 19,
BadName = 20,
BadAlg = 21,
BadTrunc = 22,
BadCookie = 23,
}Expand description
The response code for a query.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NoError = 0
There was no error in the query.
FormatError = 1
The query was malformed.
ServerFailure = 2
The server failed to fulfill the query.
NameError = 3
The name does not exist.
NotImplemented = 4
The query is not implemented.
Refused = 5
The query is refused.
YxDomain = 6
The name exists, but the query type is not supported.
YxRrSet = 7
The name does not exist, but the query type is supported.
NxRrSet = 8
The name exists, but the query type is not supported.
NotAuth = 9
The server is not authoritative for the zone.
NotZone = 10
The name does not exist in the zone.
DsoTypeNi = 11
The DSO-TYPE is not supported.
BadVers = 16
Bad OPT version.
BadKey = 17
Key not recognized.
BadTime = 18
Signature out of time window.
BadMode = 19
Bad TKEY mode.
BadName = 20
Duplicate key name.
BadAlg = 21
Algorithm not supported.
BadTrunc = 22
Bad truncation.
BadCookie = 23
Bad/missing server cookie.
Trait Implementations§
Source§impl Clone for ResponseCode
impl Clone for ResponseCode
Source§fn clone(&self) -> ResponseCode
fn clone(&self) -> ResponseCode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResponseCode
impl Debug for ResponseCode
Source§impl<'a> Deserialize<'a> for ResponseCode
impl<'a> Deserialize<'a> for ResponseCode
Source§impl Hash for ResponseCode
impl Hash for ResponseCode
Source§impl Ord for ResponseCode
impl Ord for ResponseCode
Source§fn cmp(&self, other: &ResponseCode) -> Ordering
fn cmp(&self, other: &ResponseCode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ResponseCode
impl PartialEq for ResponseCode
Source§impl PartialOrd for ResponseCode
impl PartialOrd for ResponseCode
Source§impl<'a> Serialize<'a> for ResponseCode
impl<'a> Serialize<'a> for ResponseCode
Source§impl TryFrom<u16> for ResponseCode
impl TryFrom<u16> for ResponseCode
Source§type Error = InvalidCode
type Error = InvalidCode
The type returned in the event of a conversion error.
Source§fn try_from(
value: u16,
) -> Result<ResponseCode, <ResponseCode as TryFrom<u16>>::Error>
fn try_from( value: u16, ) -> Result<ResponseCode, <ResponseCode as TryFrom<u16>>::Error>
Performs the conversion.
impl Copy for ResponseCode
impl Eq for ResponseCode
impl StructuralPartialEq for ResponseCode
Auto Trait Implementations§
impl Freeze for ResponseCode
impl RefUnwindSafe for ResponseCode
impl Send for ResponseCode
impl Sync for ResponseCode
impl Unpin for ResponseCode
impl UnwindSafe for ResponseCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more