Type Definition libp2p_dns::TokioDnsConfig

source ·
pub type TokioDnsConfig<T> = GenDnsConfig<T, TokioConnection, TokioConnectionProvider>;
Available on crate feature tokio only.
Expand description

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

Implementations§

source§

impl<T> TokioDnsConfig<T>

source

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

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

source

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

Creates a TokioDnsConfig with a custom resolver configuration and options.