Skip to main content

ToSocketAddrs

Trait ToSocketAddrs 

Source
pub trait ToSocketAddrs {
    // Required method
    fn to_socket_addrs<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<SocketAddr>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Available on crate feature network only.
Expand description

Converts or resolves without blocking to one or more SocketAddrs.

Required Methods§

Source

fn to_socket_addrs<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<SocketAddr>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Converts to resolved SocketAddrs.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl ToSocketAddrs for SocketAddr

Source§

fn to_socket_addrs<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<SocketAddr>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl ToSocketAddrs for String

Source§

fn to_socket_addrs<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<SocketAddr>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl ToSocketAddrs for str

Source§

fn to_socket_addrs<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<SocketAddr>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<'a> ToSocketAddrs for &'a [SocketAddr]

Source§

fn to_socket_addrs<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<SocketAddr>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T> ToSocketAddrs for &T
where T: ToSocketAddrs + Send + Sync + ?Sized,

Source§

fn to_socket_addrs<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<SocketAddr>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§