#[non_exhaustive]pub enum LookupError {
BadQueryCount(usize),
NameExists,
ResponseCode(ResponseCode),
NetError(NetError),
RecursiveError(RecursorError),
Io(Error),
}Expand description
A query could not be fulfilled
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.
BadQueryCount(usize)
The query had an invalid number of queries
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
NetError(NetError)
Proto error
RecursiveError(RecursorError)
Available on crate feature
recursor only.Recursive Resolver Error
Io(Error)
An underlying IO error occurred
Implementations§
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_no_records_found(&self) -> bool
pub fn is_no_records_found(&self) -> bool
Returns true if no records were returned
Sourcepub fn into_soa(self) -> Option<Box<Record<SOA>>>
pub fn into_soa(self) -> Option<Box<Record<SOA>>>
Returns the SOA record, if the error contains one
Return authority records
Trait Implementations§
Source§impl Debug for LookupError
impl Debug for LookupError
Source§impl Display for LookupError
impl Display for LookupError
Source§impl Error for LookupError
impl Error for LookupError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for LookupError
impl From<Error> for LookupError
Source§impl From<LookupError> for Error
impl From<LookupError> for Error
Source§fn from(e: LookupError) -> Self
fn from(e: LookupError) -> Self
Converts to this type from the input type.
Source§impl From<NetError> for LookupError
impl From<NetError> for LookupError
Source§impl From<ProtoError> for LookupError
impl From<ProtoError> for LookupError
Source§fn from(e: ProtoError) -> Self
fn from(e: ProtoError) -> Self
Converts to this type from the input type.
Source§impl From<RecursorError> for LookupError
impl From<RecursorError> for LookupError
Source§fn from(source: RecursorError) -> Self
fn from(source: RecursorError) -> Self
Converts to this type from the input type.
Source§impl From<ResponseCode> for LookupError
impl From<ResponseCode> for LookupError
Source§fn from(code: ResponseCode) -> Self
fn from(code: ResponseCode) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for LookupError
impl !RefUnwindSafe for LookupError
impl Send for LookupError
impl Sync for LookupError
impl Unpin for LookupError
impl UnsafeUnpin for LookupError
impl !UnwindSafe for LookupError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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