pub type TokioResolver = Resolver<TokioConnectionProvider>;
Available on crate feature
tokio-runtime
only.Expand description
An AsyncResolver used with Tokio
Aliased Type§
struct TokioResolver { /* private fields */ }
Implementations§
Source§impl TokioResolver
impl TokioResolver
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
Sourcepub fn tokio_from_system_conf() -> Result<Self, ResolveError>
Available on (Unix or Windows) and crate feature system-config
only.
pub fn tokio_from_system_conf() -> Result<Self, ResolveError>
system-config
only.Constructs a new Tokio based Resolver with the system configuration.
This will use /etc/resolv.conf
on Unix OSes and the registry on Windows.