pub struct MxResolution {
pub site_name: String,
pub by_preference: BTreeMap<u16, Vec<String>>,
pub is_mx: bool,
pub is_domain_literal: bool,
pub is_secure: bool,
}Expand description
Summary of an MX resolution attempt for a destination.
{{since(‘dev’)}}
Fields§
§site_name: StringCanonical site name; the value used as the queue grouping key for this destination.
by_preference: BTreeMap<u16, Vec<String>>MX hostnames grouped by preference. Lower preference is
preferred. Empty when DNS returned no MX records and the
resolver synthesised A/AAAA against domain directly.
is_mx: boolTrue if real MX records were found in DNS. False when the resolver synthesised an A/AAAA lookup against the domain.
is_domain_literal: boolTrue if the destination was a domain literal like [1.2.3.4].
is_secure: boolTrue if the DNS result was DNSSEC validated.
Implementations§
Source§impl MxResolution
impl MxResolution
Sourcepub fn render(&self, out: &mut dyn Write) -> Result
pub fn render(&self, out: &mut dyn Write) -> Result
Render a one-line header summarising the MX result, plus an
indented preference→host listing beneath. Shared by
kcli inspect-ready-q and kcli resolve-egress-path so the
two surfaces produce identical output for the same input.
pub fn to_human_string(&self) -> String
Trait Implementations§
Source§impl Clone for MxResolution
impl Clone for MxResolution
Source§fn clone(&self) -> MxResolution
fn clone(&self) -> MxResolution
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ComposeSchema for MxResolution
impl ComposeSchema for MxResolution
Source§impl Debug for MxResolution
impl Debug for MxResolution
Source§impl<'de> Deserialize<'de> for MxResolution
impl<'de> Deserialize<'de> for MxResolution
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<&MailExchanger> for MxResolution
impl From<&MailExchanger> for MxResolution
Source§fn from(mx: &MailExchanger) -> Self
fn from(mx: &MailExchanger) -> Self
Source§impl PartialEq for MxResolution
impl PartialEq for MxResolution
Source§impl Serialize for MxResolution
impl Serialize for MxResolution
Source§impl ToSchema for MxResolution
impl ToSchema for MxResolution
impl StructuralPartialEq for MxResolution
Auto Trait Implementations§
impl Freeze for MxResolution
impl RefUnwindSafe for MxResolution
impl Send for MxResolution
impl Sync for MxResolution
impl Unpin for MxResolution
impl UnwindSafe for MxResolution
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
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>
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