Skip to main content

ToSocketAddrs

Trait ToSocketAddrs 

Source
pub trait ToSocketAddrs {
    type Iter: Iterator<Item = SocketAddr> + Send + 'static;
    type Future: Future<Output = Result<Self::Iter, Error>> + Send + 'static;

    // Required method
    fn to_socket_addrs(&self) -> Self::Future;
}

Required Associated Types§

Source

type Iter: Iterator<Item = SocketAddr> + Send + 'static

Source

type Future: Future<Output = Result<Self::Iter, Error>> + Send + 'static

Required Methods§

Source

fn to_socket_addrs(&self) -> Self::Future

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§

impl ToSocketAddrs for (&str, u16)

Source§

impl ToSocketAddrs for (IpAddr, u16)

Source§

impl ToSocketAddrs for (Ipv4Addr, u16)

Source§

impl ToSocketAddrs for (Ipv6Addr, u16)

Source§

impl ToSocketAddrs for (String, u16)

Source§

impl ToSocketAddrs for SocketAddr

Source§

impl ToSocketAddrs for SocketAddrV4

Source§

impl ToSocketAddrs for SocketAddrV6

Source§

impl ToSocketAddrs for String

Source§

impl ToSocketAddrs for str

Source§

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

Implement this trait for &T of type !Sized(such as str), since &T of type Sized all implement it by default.

Implementors§