pub trait AsyncToSocketAddrs {
// Required method
fn to_socket_addrs(
self,
) -> impl Future<Output = Result<impl Iterator<Item = SocketAddr> + Send + 'static>> + Send + 'static
where Self: Sized;
}
Expand description
A common interface for resolving domain name + port to SocketAddr
Required Methods§
Sourcefn to_socket_addrs(
self,
) -> impl Future<Output = Result<impl Iterator<Item = SocketAddr> + Send + 'static>> + Send + 'staticwhere
Self: Sized,
fn to_socket_addrs(
self,
) -> impl Future<Output = Result<impl Iterator<Item = SocketAddr> + Send + 'static>> + Send + 'staticwhere
Self: Sized,
Resolve the domain name through DNS and return an Iterator
of SocketAddr