[][src]Trait async_coap::ToSocketAddrs

pub trait ToSocketAddrs {
    type Iter: Iterator<Item = Self::SocketAddr>;
    type SocketAddr: SocketAddrExt + Copy;
    type Error: Debug;
    fn to_socket_addrs(&self) -> Result<Self::Iter, Self::Error>;
}

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.

Associated Types

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

type SocketAddr: SocketAddrExt + Copy

The SocketAddr type returned by the above iterator.

type Error: Debug

The error type to use for errors while resolving.

Loading content...

Required methods

Loading content...

Implementors

impl ToSocketAddrs for LoopbackSocketAddr[src]

type Iter = IntoIter<Self::SocketAddr>

type SocketAddr = Self

type Error = Error

impl ToSocketAddrs for NullSocketAddr[src]

type Iter = IntoIter<Self::SocketAddr>

type SocketAddr = Self

type Error = Error

impl<T, I> ToSocketAddrs for T where
    T: ToSocketAddrs<Iter = I>,
    I: Iterator<Item = SocketAddr>, 
[src]

Blanket implementation of ToSocketAddrs for all implementations of std::net::ToSocketAddrs.

type Iter = I

type SocketAddr = SocketAddr

type Error = Error

Loading content...