pub struct HickoryResolver<C: ConnectionProvider> { /* private fields */ }Expand description
A hyper resolver using hickory’s Resolver and any implementor of ConnectionProvider.
Implementations§
Source§impl HickoryResolver<GenericConnector<TokioRuntimeProvider>>
impl HickoryResolver<GenericConnector<TokioRuntimeProvider>>
Sourcepub fn new() -> Self
Available on crate feature tokio only.
pub fn new() -> Self
tokio only.Create a new TokioHickoryResolver with the default config options.
This must be run inside a Tokio runtime context.
Sourcepub fn google() -> Self
Available on crate feature tokio only.
pub fn google() -> Self
tokio only.Create a new TokioHickoryResolver that uses the Google nameservers.
This must be run inside a Tokio runtime context.
Sourcepub fn cloudflare() -> Self
Available on crate feature tokio only.
pub fn cloudflare() -> Self
tokio only.Create a new TokioHickoryResolver that uses the Cloudflare nameservers.
This must be run inside a Tokio runtime context.
Sourcepub fn cloudflare_https() -> Self
Available on crate feature tokio and (crate features https-aws-lc-rs or https-ring) only.
pub fn cloudflare_https() -> Self
tokio and (crate features https-aws-lc-rs or https-ring) only.Create a new TokioHickoryResolver that uses the Cloudflare nameservers.
This limits the registered connections to just HTTPS lookups.
This must be run inside a Tokio runtime context.
Sourcepub fn cloudflare_tls() -> Self
Available on crate feature tokio and (crate features tls-aws-lc-rs or tls-ring) only.
pub fn cloudflare_tls() -> Self
tokio and (crate features tls-aws-lc-rs or tls-ring) only.Create a new TokioHickoryResolver that uses the Cloudflare nameservers.
This limits the registered connections to just TLS lookups.
This must be run inside a Tokio runtime context.
Sourcepub fn quad9() -> Self
Available on crate feature tokio only.
pub fn quad9() -> Self
tokio only.Create a new TokioHickoryResolver that uses the Quad9 nameservers.
This must be run inside a Tokio runtime context.
Sourcepub fn quad9_https() -> Self
Available on crate feature tokio and (crate features https-aws-lc-rs or https-ring) only.
pub fn quad9_https() -> Self
tokio and (crate features https-aws-lc-rs or https-ring) only.Create a new TokioHickoryResolver that uses the Quad9 nameservers.
This limits the registered connections to just HTTPS lookups.
This must be run inside a Tokio runtime context.
Sourcepub fn quad9_tls() -> Self
Available on crate feature tokio and (crate features tls-aws-lc-rs or tls-ring) only.
pub fn quad9_tls() -> Self
tokio and (crate features tls-aws-lc-rs or tls-ring) only.Create a new TokioHickoryResolver that uses the Quad9 nameservers.
This limits the registered connections to just TLS lookups.
This must be run inside a Tokio runtime context.
Sourcepub fn with_config_and_options(
config: ResolverConfig,
options: ResolverOpts,
) -> Self
Available on crate feature tokio only.
pub fn with_config_and_options( config: ResolverConfig, options: ResolverOpts, ) -> Self
tokio only.Create a new TokioHickoryResolver with the resolver configuration
options specified.
This must be run inside a Tokio runtime context.
Sourcepub fn from_system_conf() -> Result<Self, ResolveError>
Available on crate features tokio and system-config only.
pub fn from_system_conf() -> Result<Self, ResolveError>
tokio and system-config only.Create a new TokioHickoryResolver with the system configuration.
This must be run inside a Tokio runtime context.
§Errors
This method returns an error if loading the system configuration fails.
Source§impl<C: ConnectionProvider> HickoryResolver<C>
impl<C: ConnectionProvider> HickoryResolver<C>
Sourcepub fn from_resolver(resolver: Resolver<C>) -> Self
pub fn from_resolver(resolver: Resolver<C>) -> Self
Create a HickoryResolver from the given Resolver.
Sourcepub fn into_http_connector(self) -> HickoryHttpConnector<C>
pub fn into_http_connector(self) -> HickoryHttpConnector<C>
Create a new HickoryHttpConnector with this resolver.
Trait Implementations§
Source§impl<C: Clone + ConnectionProvider> Clone for HickoryResolver<C>
impl<C: Clone + ConnectionProvider> Clone for HickoryResolver<C>
Source§fn clone(&self) -> HickoryResolver<C>
fn clone(&self) -> HickoryResolver<C>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more