pub trait AddressResolver:
Send
+ Sync
+ 'static {
type Address: Address;
type ResolvedAddress: CheapClone + Hash + Eq + Ord + Debug + Display + Send + Sync + 'static;
type Error: Error + Send + Sync + 'static;
type Runtime: RuntimeLite;
type Options: Send + Sync + 'static;
// Required methods
fn new(
options: Self::Options,
) -> impl Future<Output = Result<Self, Self::Error>> + Send
where Self: Sized;
fn resolve(
&self,
address: &Self::Address,
) -> impl Future<Output = Result<Self::ResolvedAddress, Self::Error>> + Send;
}Available on crate feature
agnostic only.Expand description
Used to resolve a [SocketAddr] from a node address in async style.
Required Associated Types§
Sourcetype ResolvedAddress: CheapClone + Hash + Eq + Ord + Debug + Display + Send + Sync + 'static
type ResolvedAddress: CheapClone + Hash + Eq + Ord + Debug + Display + Send + Sync + 'static
The address type returned by the resolver.
Sourcetype Runtime: RuntimeLite
type Runtime: RuntimeLite
The runtime used to resolve the address.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".