pub type TokioAsyncResolver = AsyncResolver<TokioConnectionProvider>;Expand description
An AsyncResolver used with Tokio
Aliased Type§
pub struct TokioAsyncResolver { /* private fields */ }Implementations§
Source§impl TokioAsyncResolver
impl TokioAsyncResolver
Sourcepub fn tokio(config: ResolverConfig, options: ResolverOpts) -> Self
pub fn tokio(config: ResolverConfig, options: ResolverOpts) -> Self
Construct a new Tokio based AsyncResolver with the provided configuration.
§Arguments
config- configuration, name_servers, etc. for the Resolveroptions- basic lookup options for the resolver
§Returns
A tuple containing the new AsyncResolver and a future that drives the
background task that runs resolutions for the AsyncResolver. See the
documentation for AsyncResolver for more information on how to use
the background future.
Sourcepub fn tokio_from_system_conf() -> Result<Self, ResolveError>
pub fn tokio_from_system_conf() -> Result<Self, ResolveError>
Constructs a new Tokio based Resolver with the system configuration.
This will use /etc/resolv.conf on Unix OSes and the registry on Windows.