Skip to main content

AsyncToSocketAddrs

Trait AsyncToSocketAddrs 

Source
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§

Source

fn to_socket_addrs( self, ) -> impl Future<Output = Result<impl Iterator<Item = SocketAddr> + Send + 'static>> + Send + 'static
where Self: Sized,

Resolve the domain name through DNS and return an Iterator of SocketAddr

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AsyncToSocketAddrs for &[SocketAddr]

Source§

fn to_socket_addrs( self, ) -> impl Future<Output = Result<impl Iterator<Item = SocketAddr> + Send + 'static>> + Send + 'static

Source§

impl AsyncToSocketAddrs for Vec<SocketAddr>

Source§

fn to_socket_addrs( self, ) -> impl Future<Output = Result<impl Iterator<Item = SocketAddr> + Send + 'static>> + Send + 'static

Source§

impl<I: Into<IpAddr> + IpSealed> AsyncToSocketAddrs for (I, u16)

Source§

fn to_socket_addrs( self, ) -> impl Future<Output = Result<impl Iterator<Item = SocketAddr> + Send + 'static>> + Send + 'static

Implementors§

Source§

impl<'a, RK: RuntimeKit, A: ToSocketAddrs + Send + 'static> AsyncToSocketAddrs for SocketAddrsResolver<'a, RK, A>
where <A as ToSocketAddrs>::Iter: Iterator<Item = SocketAddr> + Send + 'static,

Source§

impl<A: Into<SocketAddr> + SocketSealed> AsyncToSocketAddrs for A

Source§

impl<I: IntoIterator<Item = SocketAddr> + Send + Debug + 'static> AsyncToSocketAddrs for SocketAddrs<I>
where I::IntoIter: Send + 'static,

Source§

impl<T: IntoName + Send + 'static> AsyncToSocketAddrs for HickoryToSocketAddrs<T>