pub trait DnsResolver:
Debug
+ Send
+ Sync
+ UnwindSafe
+ RefUnwindSafe {
// Required method
fn resolve(&self, host: &str) -> DnsFuture;
}cloud-base and non-WebAssembly only.Expand description
A custom DNS resolver used when establishing connections to remote object stores
This can be used to implement custom resolution logic such as caching, address shuffling, or split-horizon DNS, independent of the underlying HTTP transport.
Configure via ClientOptions::with_dns_resolver. The built-in
reqwest-based transport honors this automatically; custom
HttpConnector implementations should retrieve it via
ClientOptions::dns_resolver and apply it themselves.
Required Methods§
Sourcefn resolve(&self, host: &str) -> DnsFuture
fn resolve(&self, host: &str) -> DnsFuture
Resolve host to one or more IP addresses
The returned addresses are tried in order until a connection succeeds, so implementations are responsible for any ordering they require, e.g. shuffling or interleaving of address families. The port is determined by the transport from the URL, not by the resolver.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".