pub trait DnsCache {
type Txt: ResolverCache<Box<str>, TxtRecord>;
type Mx: ResolverCache<Box<str>, Result<RecordSet<Mx>, Negative>>;
type Ipv4: ResolverCache<Box<str>, Result<RecordSet<Ipv4Addr>, Negative>>;
type Ipv6: ResolverCache<Box<str>, Result<RecordSet<Ipv6Addr>, Negative>>;
type Ptr: ResolverCache<IpAddr, Result<RecordSet<Box<str>>, Negative>>;
// Required methods
fn txt(&self) -> Option<&Self::Txt>;
fn mx(&self) -> Option<&Self::Mx>;
fn ipv4(&self) -> Option<&Self::Ipv4>;
fn ipv6(&self) -> Option<&Self::Ipv6>;
fn ptr(&self) -> Option<&Self::Ptr>;
}Expand description
A set of DNS caches, one per record type, passed to verifiers through
Parameters::with_cache.
An accessor that returns None disables caching for that record type.
See the module documentation for an example.
Required Associated Types§
Sourcetype Txt: ResolverCache<Box<str>, TxtRecord>
type Txt: ResolverCache<Box<str>, TxtRecord>
Cache for parsed TXT records (SPF, DKIM, DMARC, ATPS, MTA-STS, TLSRPT), keyed by fully qualified domain name.
Sourcetype Mx: ResolverCache<Box<str>, Result<RecordSet<Mx>, Negative>>
type Mx: ResolverCache<Box<str>, Result<RecordSet<Mx>, Negative>>
Cache for MX records and negative MX answers, keyed by fully qualified domain name.
Sourcetype Ipv4: ResolverCache<Box<str>, Result<RecordSet<Ipv4Addr>, Negative>>
type Ipv4: ResolverCache<Box<str>, Result<RecordSet<Ipv4Addr>, Negative>>
Cache for A records and negative A answers, keyed by fully qualified domain name.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".