Type Definition libp2p_dns::DnsConfig

source ·
pub type DnsConfig<T> = GenDnsConfig<T, AsyncStdConnection, AsyncStdConnectionProvider>;
Available on crate feature async-std only.
Expand description

A Transport wrapper for performing DNS lookups when dialing Multiaddresses using async-std for all async I/O.

Implementations§

source§

impl<T> DnsConfig<T>

source

pub async fn system(inner: T) -> Result<DnsConfig<T>, Error>

Creates a new DnsConfig from the OS’s DNS configuration and defaults.

source

pub async fn custom( inner: T, cfg: ResolverConfig, opts: ResolverOpts ) -> Result<DnsConfig<T>, Error>

Creates a DnsConfig with a custom resolver configuration and options.