Type Alias libp2p_dns::tokio::Transport

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

Aliased Type§

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

Implementations§

source§

impl<T> Transport<T>

source

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

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

source

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

Creates a Transport with a custom resolver configuration and options.