Enum trust_dns_server::authority::LookupError
source · [−]#[non_exhaustive]
pub enum LookupError {
NameExists,
ResponseCode(ResponseCode),
ResolveError(ResolveError),
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)
tokio-runtime
only.Resolve Error
Io(Error)
An underlying IO error occurred
Implementations
sourceimpl LookupError
impl LookupError
sourcepub fn as_name_exists_mut(&mut self) -> Option<()>
pub fn as_name_exists_mut(&mut self) -> Option<()>
Optionally returns references to the inner fields if this is a LookupError::NameExists
, otherwise None
sourcepub fn as_name_exists(&self) -> Option<()>
pub fn as_name_exists(&self) -> Option<()>
Optionally returns references to the inner fields if this is a LookupError::NameExists
, otherwise None
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 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 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
sourceimpl 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_name_exists(&self) -> bool
pub fn is_name_exists(&self) -> bool
True if other records exist at the same name, but not the searched for 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
Trait Implementations
sourceimpl Debug for LookupError
impl Debug for LookupError
sourceimpl Display for LookupError
impl Display for LookupError
sourceimpl Error for LookupError
impl Error for LookupError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<LookupError> for Error
impl From<LookupError> for Error
sourcefn from(e: LookupError) -> Self
fn from(e: LookupError) -> Self
Performs the conversion.
sourceimpl From<ResolveError> for LookupError
impl From<ResolveError> for LookupError
sourcefn from(source: ResolveError) -> Self
fn from(source: ResolveError) -> Self
Performs the conversion.
sourceimpl From<ResponseCode> for LookupError
impl From<ResponseCode> for LookupError
sourcefn from(code: ResponseCode) -> Self
fn from(code: ResponseCode) -> Self
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for LookupError
impl Send for LookupError
impl Sync for LookupError
impl Unpin for LookupError
impl UnwindSafe for LookupError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more