Trait ToSocketAddrs

Source
pub trait ToSocketAddrs {
    type Iter: Iterator<Item = Self::SocketAddr>;
    type SocketAddr: SocketAddrExt + Copy;
    type Error: Debug;

    // Required method
    fn to_socket_addrs(&self) -> Result<Self::Iter, Self::Error>;
}
Expand description

A flavor of std::net::ToSocketAddrs that allows the implementation of SocketAddr to be replaced.

This is necessary to enable support for things like CoAP-over-SMS, where socket addresses are telephone numbers.

Required Associated Types§

Source

type Iter: Iterator<Item = Self::SocketAddr>

Source

type SocketAddr: SocketAddrExt + Copy

The SocketAddr type returned by the above iterator.

Source

type Error: Debug

The error type to use for errors while resolving.

Required Methods§

Implementors§