Trait AddressCandidates
pub trait AddressCandidates:
Send
+ Sync
+ 'static {
// Required methods
fn domain(&self) -> &Domain;
fn stream<'a>(
&'a self,
extensions: &'a Extensions,
) -> Pin<Box<dyn Stream<Item = Result<IpAddr, Box<dyn Error + Sync + Send>>> + Send + 'a>>;
}Available on crate feature
net only.Expand description
A lazily-resolved source of connection target IpAddresses.
This is the abstraction boundary between resolving a target and
connecting to it. An upstream connector (e.g. the rama-dns address
resolver) stamps a ConnectorTargetStream into the Extensions, and a
transport connector consumes it: dialing (and optionally racing) the
yielded addresses. The transport stays resolver-agnostic: it only ever sees
a stream of IpAddrs, never a DNS resolver. It combines each address with
the current connector target’s port immediately before dialing.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".