pub struct TrustDnsResolver { /* private fields */ }Expand description
A hyper resolver using trust-dns’s TokioAsyncResolver.
Implementations§
Source§impl TrustDnsResolver
impl TrustDnsResolver
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new TrustDnsResolver with the default config options.
This must be run inside a Tokio runtime context.
Sourcepub fn google() -> Self
pub fn google() -> Self
Create a new TrustDnsResolver that uses the Google nameservers.
This must be run inside a Tokio runtime context.
Sourcepub fn cloudflare() -> Self
pub fn cloudflare() -> Self
Create a new TrustDnsResolver that uses the Cloudflare nameservers.
This must be run inside a Tokio runtime context.
Sourcepub fn cloudflare_https() -> Self
Available on crate feature dns-over-https-rustls only.
pub fn cloudflare_https() -> Self
dns-over-https-rustls only.Create a new TrustDnsResolver 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 features dns-over-rustls or dns-over-native-tls or dns-over-openssl only.
pub fn cloudflare_tls() -> Self
dns-over-rustls or dns-over-native-tls or dns-over-openssl only.Create a new TrustDnsResolver 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
pub fn quad9() -> Self
Create a new TrustDnsResolver that uses the Quad9 nameservers.
This must be run inside a Tokio runtime context.
Sourcepub fn quad9_https() -> Self
Available on crate feature dns-over-https-rustls only.
pub fn quad9_https() -> Self
dns-over-https-rustls only.Create a new TrustDnsResolver 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 features dns-over-rustls or dns-over-native-tls or dns-over-openssl only.
pub fn quad9_tls() -> Self
dns-over-rustls or dns-over-native-tls or dns-over-openssl only.Create a new TrustDnsResolver 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
pub fn with_config_and_options( config: ResolverConfig, options: ResolverOpts, ) -> Self
Create a new TrustDnsResolver with the resolver configuration
options specified.
This must be run inside a Tokio runtime context.
Sourcepub fn from_system_conf() -> Self
Available on crate feature system-config only.
pub fn from_system_conf() -> Self
system-config only.Create a new TrustDnsResolver with the system configuration.
This must be run inside a Tokio runtime context.
Sourcepub fn into_http_connector(self) -> TrustDnsHttpConnector
pub fn into_http_connector(self) -> TrustDnsHttpConnector
Create a new TrustDnsHttpConnector with this resolver.
Sourcepub fn into_native_tls_https_connector(self) -> NativeTlsHttpsConnector
Available on crate feature native-tls only.
pub fn into_native_tls_https_connector(self) -> NativeTlsHttpsConnector
native-tls only.Create a new NativeTlsHttpsConnector.
Sourcepub fn into_rustls_native_https_connector(self) -> RustlsHttpsConnector
Available on crate feature rustls-native only.
pub fn into_rustls_native_https_connector(self) -> RustlsHttpsConnector
rustls-native only.Create a new RustlsHttpsConnector using the OS root store.
Sourcepub fn into_rustls_webpki_https_connector(self) -> RustlsHttpsConnector
Available on crate feature rustls-webpki only.
pub fn into_rustls_webpki_https_connector(self) -> RustlsHttpsConnector
rustls-webpki only.Create a new RustlsHttpsConnector using the webpki_roots.
Trait Implementations§
Source§impl Clone for TrustDnsResolver
impl Clone for TrustDnsResolver
Source§fn clone(&self) -> TrustDnsResolver
fn clone(&self) -> TrustDnsResolver
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read more