Skip to main content

SharedResolverState

Trait SharedResolverState 

Source
pub trait SharedResolverState: ConnectionProvider + Default {
    // Provided method
    fn shared_resolver() -> Option<&'static HickoryDnsResolver<Self>> { ... }
}
Expand description

Associates a ConnectionProvider with the process-wide shared resolver instance backing HickoryDnsResolver::shared, if one exists for that provider.

TokioRuntimeProvider is the only connection provider with shared state; every other connection provider always builds an independent resolver, so use_shared-style sharing has no effect for them.

Provided Methods§

Source

fn shared_resolver() -> Option<&'static HickoryDnsResolver<Self>>

The process-wide shared resolver instance for this connection provider, if one exists.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SharedResolverState for TokioRuntimeProvider

Implementors§