Trait DnsCnameResolver
pub trait DnsCnameResolver:
Sized
+ Send
+ Sync
+ 'static {
type Error: Into<Box<dyn Error + Send + Sync>> + Send + 'static;
// Required method
fn lookup_cname(
&self,
domain: Domain,
) -> impl Stream<Item = Result<Name, Self::Error>> + Send;
// Provided method
fn into_box_dns_cname_resolver(self) -> BoxDnsCnameResolver { ... }
}Available on crate features
dns and std only.Expand description
A resolver of domains into CNAME records.
Required Associated Types§
Required Methods§
fn lookup_cname(
&self,
domain: Domain,
) -> impl Stream<Item = Result<Name, Self::Error>> + Send
fn lookup_cname( &self, domain: Domain, ) -> impl Stream<Item = Result<Name, Self::Error>> + Send
Resolve CNAME targets for the given domain.
Each successful stream item is one CNAME target. A recursive resolver may return more than one item when it exposes an alias chain. This is an explicit CNAME query; other record lookups may follow aliases internally without exposing them through this method.
Provided Methods§
fn into_box_dns_cname_resolver(self) -> BoxDnsCnameResolver
fn into_box_dns_cname_resolver(self) -> BoxDnsCnameResolver
Box this resolver to allow dynamic dispatch.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".