Trait DnsIpPicker
pub trait DnsIpPicker:
Send
+ Sync
+ 'static {
// Required method
fn pick(
&self,
host: &Domain,
resolution: &HostResolution,
) -> Result<Option<IpAddr>, Box<dyn Error + Send + Sync>>;
}Available on crate feature
dns only.Expand description
Strategy that selects one IpAddr from a HostResolution.
Pickers should mostly be stateless themselves, any per-host state (e.g. a
round-robin cursor) should live in the HostResolution::state extensions
bag, which is scoped to the host and preserved across background DNS
refreshes.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".