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§
type Iter: Iterator<Item = SocketAddr> + Send + 'static
type Future: Future<Output = Result<Self::Iter, Error>> + Send + 'static
Required Methods§
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]
impl ToSocketAddrs for &[SocketAddr]
type Future = Ready<Result<<&[SocketAddr] as ToSocketAddrs>::Iter, Error>>
type Iter = IntoIter<SocketAddr>
fn to_socket_addrs(&self) -> Self::Future
Source§impl ToSocketAddrs for (&str, u16)
impl ToSocketAddrs for (&str, u16)
Source§impl ToSocketAddrs for (IpAddr, u16)
impl ToSocketAddrs for (IpAddr, u16)
Source§impl ToSocketAddrs for (Ipv4Addr, u16)
impl ToSocketAddrs for (Ipv4Addr, u16)
Source§impl ToSocketAddrs for (Ipv6Addr, u16)
impl ToSocketAddrs for (Ipv6Addr, u16)
Source§impl ToSocketAddrs for (String, u16)
impl ToSocketAddrs for (String, u16)
Source§impl ToSocketAddrs for SocketAddr
impl ToSocketAddrs for SocketAddr
type Future = Ready<Result<<SocketAddr as ToSocketAddrs>::Iter, Error>>
type Iter = IntoIter<SocketAddr>
fn to_socket_addrs(&self) -> Self::Future
Source§impl ToSocketAddrs for SocketAddrV4
impl ToSocketAddrs for SocketAddrV4
type Future = Ready<Result<<SocketAddrV4 as ToSocketAddrs>::Iter, Error>>
type Iter = IntoIter<SocketAddr>
fn to_socket_addrs(&self) -> Self::Future
Source§impl ToSocketAddrs for SocketAddrV6
impl ToSocketAddrs for SocketAddrV6
type Future = Ready<Result<<SocketAddrV6 as ToSocketAddrs>::Iter, Error>>
type Iter = IntoIter<SocketAddr>
fn to_socket_addrs(&self) -> Self::Future
Source§impl ToSocketAddrs for String
impl ToSocketAddrs for String
Source§impl ToSocketAddrs for str
impl ToSocketAddrs for str
Source§impl<T> ToSocketAddrs for &Twhere
T: ToSocketAddrs + ?Sized,
Implement this trait for &T of type !Sized(such as str), since &T of type Sized all implement it
by default.
impl<T> ToSocketAddrs for &Twhere
T: ToSocketAddrs + ?Sized,
Implement this trait for &T of type !Sized(such as str), since &T of type Sized all implement it by default.