Type Definition libp2p_dns::DnsConfig
source · pub type DnsConfig<T> = GenDnsConfig<T, AsyncStdConnection, AsyncStdConnectionProvider>;
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.
Implementations§
source§impl<T> DnsConfig<T>
impl<T> DnsConfig<T>
sourcepub async fn system(inner: T) -> Result<DnsConfig<T>, Error>
pub async fn system(inner: T) -> Result<DnsConfig<T>, Error>
Creates a new DnsConfig
from the OS’s DNS configuration and defaults.
sourcepub async fn custom(
inner: T,
cfg: ResolverConfig,
opts: ResolverOpts
) -> Result<DnsConfig<T>, Error>
pub async fn custom(
inner: T,
cfg: ResolverConfig,
opts: ResolverOpts
) -> Result<DnsConfig<T>, Error>
Creates a DnsConfig
with a custom resolver configuration and options.