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