pub trait ToSocketAddrsAsync {
type Iter: Iterator<Item = SocketAddr>;
// Required method
async fn to_socket_addrs_async(&self) -> Result<Self::Iter>;
}
Expand description
A trait for objects which can be converted or resolved to one or more
SocketAddr
values.
§Cancel safety
All implementation of ToSocketAddrsAsync
in this crate is safe to cancel
by dropping the future. The Glibc impl may leak the control block if the
task is not completed when dropping.
Required Associated Types§
Sourcetype Iter: Iterator<Item = SocketAddr>
type Iter: Iterator<Item = SocketAddr>
Required Methods§
Sourceasync fn to_socket_addrs_async(&self) -> Result<Self::Iter>
async fn to_socket_addrs_async(&self) -> Result<Self::Iter>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.