[][src]Trait async_std::net::ToSocketAddrs

pub trait ToSocketAddrs {
    type Iter: Iterator<Item = SocketAddr>;
    fn to_socket_addrs(&self) -> ImplFuture<Result<Self::Iter>>;
}

A trait for objects which can be converted or resolved to one or more SocketAddr values.

This trait is an async version of std::net::ToSocketAddrs.

Associated Types

type Iter: Iterator<Item = SocketAddr>[]

Returned iterator over socket addresses which this type may correspond to.

Required methods

fn to_socket_addrs(&self) -> ImplFuture<Result<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.

Implementations on Foreign Types

impl ToSocketAddrs for SocketAddr[src][]

impl ToSocketAddrs for SocketAddrV4[src][]

impl ToSocketAddrs for SocketAddrV6[src][]

impl ToSocketAddrs for (IpAddr, u16)[src][]

impl ToSocketAddrs for (Ipv4Addr, u16)[src][]

impl ToSocketAddrs for (Ipv6Addr, u16)[src][]

impl<'_> ToSocketAddrs for (&'_ str, u16)[src][]

impl ToSocketAddrs for str[src][]

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

impl<'_, T: ToSocketAddrs + ?Sized> ToSocketAddrs for &'_ T[src][]

impl ToSocketAddrs for String[src][]

Implementors