Type Alias libp2p_dns::async_std::Transport

source ·
pub type Transport<T> = Transport<T, AsyncStdResolver>;
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.

Aliased Type§

struct Transport<T> { /* private fields */ }

Implementations§

source§

impl<T> Transport<T>

source

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

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

source

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

Creates a Transport with a custom resolver configuration and options.