pub trait DnsResolver:
Send
+ Sync
+ Debug {
// Required methods
fn find_zone<'life0, 'life1, 'async_trait>(
&'life0 self,
fqdn: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn txt_contains<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: &'life2 str,
resolvers: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
DNS lookup operations used by propagation and zone discovery.
The default solver implementation uses crate::dnsutil and the system
resolver. Callers that already have a DNS client, and tests that must not
touch the network, can inject an implementation with
Dns01Solver::with_resolver. An empty resolvers slice means the
implementation should use its authoritative-name-server path; non-empty
entries are explicit IP addresses (port 53) or IP socket addresses with
an explicit port, such as 127.0.0.1:5300 or [::1]:5300.
Required Methods§
Sourcefn find_zone<'life0, 'life1, 'async_trait>(
&'life0 self,
fqdn: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_zone<'life0, 'life1, 'async_trait>(
&'life0 self,
fqdn: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find the closest SOA apex for fqdn.
Sourcefn txt_contains<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: &'life2 str,
resolvers: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn txt_contains<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: &'life2 str,
resolvers: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Check whether name contains value.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".