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