#[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
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.
§

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)

Available on crate feature resolver only.

Resolve Error

§

RecursiveError(Error)

Available on crate feature recursor only.

Recursive Resolver Error

§

Io(Error)

An underlying IO error occurred

Implementations§

source§

impl LookupError

source

pub fn is_name_exists(&self) -> bool

Returns true if this is a LookupError::NameExists, otherwise false

source

pub fn is_response_code(&self) -> bool

Returns true if this is a LookupError::ResponseCode, otherwise false

source

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

source

pub fn as_response_code(&self) -> Option<&ResponseCode>

Optionally returns references to the inner fields if this is a LookupError::ResponseCode, otherwise None

source

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

source

pub fn is_resolve_error(&self) -> bool

Returns true if this is a LookupError::ResolveError, otherwise false

source

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

source

pub fn as_resolve_error(&self) -> Option<&ResolveError>

Optionally returns references to the inner fields if this is a LookupError::ResolveError, otherwise None

source

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

source

pub fn is_recursive_error(&self) -> bool

Returns true if this is a LookupError::RecursiveError, otherwise false

source

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

source

pub fn as_recursive_error(&self) -> Option<&Error>

Optionally returns references to the inner fields if this is a LookupError::RecursiveError, otherwise None

source

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

source

pub fn is_io(&self) -> bool

Returns true if this is a LookupError::Io, otherwise false

source

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

pub fn as_io(&self) -> Option<&Error>

Optionally returns references to the inner fields if this is a LookupError::Io, otherwise None

source

pub fn into_io(self) -> Result<Error, Self>

Returns the inner fields if this is a LookupError::Io, otherwise returns back the enum in the Err case of the result

source§

impl LookupError

source

pub fn for_name_exists() -> Self

Create a lookup error, specifying that a name exists at the location, but no matching RecordType

source

pub fn is_nx_domain(&self) -> bool

This is a non-existent domain name

source

pub fn is_refused(&self) -> bool

This is a non-existent domain name

Trait Implementations§

source§

impl Debug for LookupError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for LookupError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for LookupError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for LookupError

source§

fn from(e: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for LookupError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<LookupError> for Error

source§

fn from(e: LookupError) -> Self

Converts to this type from the input type.
source§

impl From<ResolveError> for LookupError

source§

fn from(source: ResolveError) -> Self

Converts to this type from the input type.
source§

impl From<ResponseCode> for LookupError

source§

fn from(code: ResponseCode) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more