Trait cap_async_std::net::ToSocketAddrs  
source · [−]pub trait ToSocketAddrs {
    type Iter: Iterator
   where
        <Self::Iter as Iterator>::Item == SocketAddr;
    fn to_socket_addrs(&self) -> ToSocketAddrsFuture<Self::Iter>;
}Expand description
Converts or resolves addresses to SocketAddr values.
This trait is an async version of std::net::ToSocketAddrs.
Examples
use async_std::net::ToSocketAddrs;
let addr = "localhost:8080".to_socket_addrs().await?.next().unwrap();
println!("resolved: {:?}", addr);Required Associated Types
Required Methods
sourcefn to_socket_addrs(&self) -> ToSocketAddrsFuture<Self::Iter>
fn to_socket_addrs(&self) -> ToSocketAddrsFuture<Self::Iter>
Converts this object to an iterator of resolved SocketAddrs.
The returned iterator may not actually yield any values depending on the outcome of any resolution performed.
Note that this function may block a backend thread while resolution is performed.