Trait DnsResolver
pub trait DnsResolver:
Sized
+ Send
+ Sync
+ 'static {
type Error: Into<Box<dyn Error + Send + Sync>> + Send + 'static;
// 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;
// Provided method
fn boxed(self) -> BoxDnsResolver { ... }
}
Expand description
A resolver of domains into IP addresses.
Required Associated Types§
Required Methods§
Provided Methods§
fn boxed(self) -> BoxDnsResolver
fn boxed(self) -> BoxDnsResolver
Box this resolver to allow for dynamic dispatch.
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.