pub enum TxtRecord {
Spf(Arc<SpfRecord>),
SpfExplanation(Arc<Macro>),
DomainKey(Arc<DomainKey>),
DkimReport(Arc<DkimReportRecord>),
Dmarc(Arc<DmarcRecord>),
Atps(Arc<AtpsRecord>),
MtaSts(Arc<MtaStsRecord>),
TlsRpt(Arc<TlsRptRecord>),
Error(Error),
}Expand description
A parsed DNS TXT record, as stored in the TXT ResolverCache of a
DnsCache.
MessageAuthenticator::txt_lookup
parses the TXT answer into the record type the caller asked for and caches
the outcome as a TxtRecord, so a cache hit skips both the query and the
parse. When no TXT record of the requested type parses, the error is
cached as TxtRecord::Error, and so is a negative answer (NXDOMAIN or
NODATA) that carries an SOA record; resolver failures are not cached. Each
record type converts into its variant with From, which lets cache
implementations pre-populate entries.
Variants§
Spf(Arc<SpfRecord>)
An SPF record (RFC 7208 Section 4.5).
SpfExplanation(Arc<Macro>)
The explanation string fetched from the target of an SPF exp=
modifier (RFC 7208 Section 6.2), kept unexpanded.
DomainKey(Arc<DomainKey>)
A DKIM public key record (RFC 6376 Section 3.6.1).
DkimReport(Arc<DkimReportRecord>)
A DKIM failure reporting record (RFC 6651 Section 3).
Dmarc(Arc<DmarcRecord>)
A DMARC policy record (RFC 9989).
Atps(Arc<AtpsRecord>)
A DKIM Authorized Third-Party Signatures record (RFC 6541 Section 4).
MtaSts(Arc<MtaStsRecord>)
An MTA-STS record (RFC 8461 Section 3.1).
TlsRpt(Arc<TlsRptRecord>)
An SMTP TLS Reporting record (RFC 8460 Section 3).
Error(Error)
No TXT record at the name parsed as the requested type, or the name has no TXT records. Holds the error returned to the caller.
Implementations§
Trait Implementations§
Source§impl From<AtpsRecord> for TxtRecord
impl From<AtpsRecord> for TxtRecord
Source§fn from(v: AtpsRecord) -> Self
fn from(v: AtpsRecord) -> Self
Source§impl From<DkimReportRecord> for TxtRecord
impl From<DkimReportRecord> for TxtRecord
Source§fn from(v: DkimReportRecord) -> Self
fn from(v: DkimReportRecord) -> Self
Source§impl From<DmarcRecord> for TxtRecord
impl From<DmarcRecord> for TxtRecord
Source§fn from(v: DmarcRecord) -> Self
fn from(v: DmarcRecord) -> Self
Source§impl From<MtaStsRecord> for TxtRecord
impl From<MtaStsRecord> for TxtRecord
Source§fn from(v: MtaStsRecord) -> Self
fn from(v: MtaStsRecord) -> Self
Source§impl From<TlsRptRecord> for TxtRecord
impl From<TlsRptRecord> for TxtRecord
Source§fn from(v: TlsRptRecord) -> Self
fn from(v: TlsRptRecord) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for TxtRecord
impl !UnwindSafe for TxtRecord
impl Freeze for TxtRecord
impl Send for TxtRecord
impl Sync for TxtRecord
impl Unpin for TxtRecord
impl UnsafeUnpin for TxtRecord
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,
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> ⓘ
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