Trait DnsResolver
pub trait DnsResolver:
Send
+ Sync
+ 'static {
type Error;
// Required methods
fn ipv4_lookup(
&self,
domain: Domain,
) -> impl Future<Output = Result<Vec<Ipv4Addr>, Self::Error>> + Send;
fn ipv6_lookup(
&self,
domain: Domain,
) -> impl Future<Output = Result<Vec<Ipv6Addr>, Self::Error>> + Send;
}
Expand description
A resolver of domains into IP addresses.
Required Associated Types§
type Error
type Error
Error returned by the DnsResolver
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.