Trait tokio_socks::ToProxyAddrs

source ·
pub trait ToProxyAddrs {
    type Output: Stream<Item = Result<SocketAddr>> + Unpin;

    // Required method
    fn to_proxy_addrs(&self) -> Self::Output;
}
Expand description

A trait for objects which can be converted or resolved to one or more SocketAddr values, which are going to be connected as the the proxy server.

This trait is similar to std::net::ToSocketAddrs but allows asynchronous name resolution.

Required Associated Types§

Required Methods§

source

fn to_proxy_addrs(&self) -> Self::Output

Implementations on Foreign Types§

source§

impl ToProxyAddrs for (IpAddr, u16)

source§

impl ToProxyAddrs for (Ipv4Addr, u16)

source§

impl ToProxyAddrs for (Ipv6Addr, u16)

source§

impl ToProxyAddrs for SocketAddr

source§

impl ToProxyAddrs for str

source§

impl ToProxyAddrs for SocketAddrV4

source§

impl ToProxyAddrs for SocketAddrV6

source§

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

source§

impl<'a> ToProxyAddrs for (&'a str, u16)

source§

impl<'a, T: ToProxyAddrs + ?Sized> ToProxyAddrs for &'a T

§

type Output = <T as ToProxyAddrs>::Output

source§

fn to_proxy_addrs(&self) -> Self::Output

Implementors§