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 Multiaddr
esses
using tokio
for all async I/O.
Aliased Type§
struct Transport<T> { /* private fields */ }
Implementations§
source§impl<T> Transport<T>
impl<T> Transport<T>
sourcepub fn system(inner: T) -> Result<Transport<T, TokioAsyncResolver>, Error>
pub fn system(inner: T) -> Result<Transport<T, TokioAsyncResolver>, Error>
Creates a new Transport
from the OS’s DNS configuration and defaults.
sourcepub fn custom(
inner: T,
cfg: ResolverConfig,
opts: ResolverOpts
) -> Result<Transport<T, TokioAsyncResolver>, Error>
pub fn custom( inner: T, cfg: ResolverConfig, opts: ResolverOpts ) -> Result<Transport<T, TokioAsyncResolver>, Error>
Creates a Transport
with a custom resolver configuration
and options.