pub struct MxResolveError {
pub kind: MxResolveFailure,
pub message: String,
}Expand description
An MX resolution failure: its MxResolveFailure classification together
with a human-readable message. Display writes message verbatim, which
means {err} formatting (including anyhow!("{err}") and log output)
reproduces that text. Conversion to anyhow::Error keeps this concrete
type rather than erasing it: a caller holding the resulting anyhow::Error
can recover the classification with downcast_ref::<MxResolveError>().
Fields§
§kind: MxResolveFailure§message: StringImplementations§
Source§impl MxResolveError
impl MxResolveError
Sourcepub fn is_nxdomain(&self) -> bool
pub fn is_nxdomain(&self) -> bool
Whether the resolver returned NXDOMAIN for the name, for callers that need to single out that case without inspecting the message text.
Trait Implementations§
Source§impl Clone for MxResolveError
impl Clone for MxResolveError
Source§fn clone(&self) -> MxResolveError
fn clone(&self) -> MxResolveError
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 MxResolveError
impl Debug for MxResolveError
Source§impl Display for MxResolveError
impl Display for MxResolveError
Source§impl Error for MxResolveError
impl Error for MxResolveError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for MxResolveError
impl RefUnwindSafe for MxResolveError
impl Send for MxResolveError
impl Sync for MxResolveError
impl Unpin for MxResolveError
impl UnwindSafe for MxResolveError
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,
§impl<E> ExternalError for E
impl<E> ExternalError for E
fn into_lua_err(self) -> Error
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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