Struct hyper_trust_dns::TrustDnsResolver
source · [−]pub struct TrustDnsResolver { /* private fields */ }Expand description
A hyper resolver using trust-dns’s TokioAsyncResolver.
Implementations
sourceimpl 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
This is supported on crate feature dns-over-https only.
pub fn cloudflare_https() -> Self
dns-over-https 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
This is supported on crate feature dns-over-tls only.
pub fn cloudflare_tls() -> Self
dns-over-tls 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
This is supported on crate feature dns-over-https only.
pub fn quad9_https() -> Self
dns-over-https 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
This is supported on crate feature dns-over-tls only.
pub fn quad9_tls() -> Self
dns-over-tls 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
This is supported 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
This is supported 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
This is supported 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
This is supported on crate feature rustls-native only.
pub fn into_rustls_webpki_https_connector(self) -> RustlsHttpsConnector
rustls-native only.Create a new RustlsHttpsConnector using the webpki_roots.
Trait Implementations
sourceimpl Clone for TrustDnsResolver
impl Clone for TrustDnsResolver
sourcefn clone(&self) -> TrustDnsResolver
fn clone(&self) -> TrustDnsResolver
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Default for TrustDnsResolver
impl Default for TrustDnsResolver
sourceimpl Service<Name> for TrustDnsResolver
impl Service<Name> for TrustDnsResolver
type Response = SocketAddrs
type Response = SocketAddrs
Responses given by the service.
type Error = ResolveError
type Error = ResolveError
Errors produced by the service.
type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send>>
The future response value.
Auto Trait Implementations
impl !RefUnwindSafe for TrustDnsResolver
impl Send for TrustDnsResolver
impl Sync for TrustDnsResolver
impl Unpin for TrustDnsResolver
impl !UnwindSafe for TrustDnsResolver
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more