Enum trust_dns_server::authority::LookupError
source · #[non_exhaustive]pub enum LookupError {
NameExists,
ResponseCode(ResponseCode),
ResolveError(ResolveError),
RecursiveError(Error),
Io(Error),
}
Expand description
A query could not be fulfilled
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NameExists
A record at the same Name as the query exists, but not of the queried RecordType
ResponseCode(ResponseCode)
There was an error performing the lookup
ResolveError(ResolveError)
resolver
only.Resolve Error
RecursiveError(Error)
recursor
only.Recursive Resolver Error
Io(Error)
An underlying IO error occurred
Implementations§
source§impl LookupError
impl LookupError
sourcepub fn is_name_exists(&self) -> bool
pub fn is_name_exists(&self) -> bool
Returns true if this is a LookupError::NameExists
, otherwise false
sourcepub fn is_response_code(&self) -> bool
pub fn is_response_code(&self) -> bool
Returns true if this is a LookupError::ResponseCode
, otherwise false
sourcepub fn as_response_code_mut(&mut self) -> Option<&mut ResponseCode>
pub fn as_response_code_mut(&mut self) -> Option<&mut ResponseCode>
Optionally returns mutable references to the inner fields if this is a LookupError::ResponseCode
, otherwise None
sourcepub fn as_response_code(&self) -> Option<&ResponseCode>
pub fn as_response_code(&self) -> Option<&ResponseCode>
Optionally returns references to the inner fields if this is a LookupError::ResponseCode
, otherwise None
sourcepub fn into_response_code(self) -> Result<ResponseCode, Self>
pub fn into_response_code(self) -> Result<ResponseCode, Self>
Returns the inner fields if this is a LookupError::ResponseCode
, otherwise returns back the enum in the Err
case of the result
sourcepub fn is_resolve_error(&self) -> bool
pub fn is_resolve_error(&self) -> bool
Returns true if this is a LookupError::ResolveError
, otherwise false
sourcepub fn as_resolve_error_mut(&mut self) -> Option<&mut ResolveError>
pub fn as_resolve_error_mut(&mut self) -> Option<&mut ResolveError>
Optionally returns mutable references to the inner fields if this is a LookupError::ResolveError
, otherwise None
sourcepub fn as_resolve_error(&self) -> Option<&ResolveError>
pub fn as_resolve_error(&self) -> Option<&ResolveError>
Optionally returns references to the inner fields if this is a LookupError::ResolveError
, otherwise None
sourcepub fn into_resolve_error(self) -> Result<ResolveError, Self>
pub fn into_resolve_error(self) -> Result<ResolveError, Self>
Returns the inner fields if this is a LookupError::ResolveError
, otherwise returns back the enum in the Err
case of the result
sourcepub fn is_recursive_error(&self) -> bool
pub fn is_recursive_error(&self) -> bool
Returns true if this is a LookupError::RecursiveError
, otherwise false
sourcepub fn as_recursive_error_mut(&mut self) -> Option<&mut Error>
pub fn as_recursive_error_mut(&mut self) -> Option<&mut Error>
Optionally returns mutable references to the inner fields if this is a LookupError::RecursiveError
, otherwise None
sourcepub fn as_recursive_error(&self) -> Option<&Error>
pub fn as_recursive_error(&self) -> Option<&Error>
Optionally returns references to the inner fields if this is a LookupError::RecursiveError
, otherwise None
sourcepub fn into_recursive_error(self) -> Result<Error, Self>
pub fn into_recursive_error(self) -> Result<Error, Self>
Returns the inner fields if this is a LookupError::RecursiveError
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_io_mut(&mut self) -> Option<&mut Error>
pub fn as_io_mut(&mut self) -> Option<&mut Error>
Optionally returns mutable references to the inner fields if this is a LookupError::Io
, otherwise None
source§impl LookupError
impl LookupError
sourcepub fn for_name_exists() -> Self
pub fn for_name_exists() -> Self
Create a lookup error, specifying that a name exists at the location, but no matching RecordType
sourcepub fn is_nx_domain(&self) -> bool
pub fn is_nx_domain(&self) -> bool
This is a non-existent domain name
sourcepub fn is_refused(&self) -> bool
pub fn is_refused(&self) -> bool
This is a non-existent domain name