compio_net

Trait ToSocketAddrsAsync

Source
pub trait ToSocketAddrsAsync {
    type Iter: Iterator<Item = SocketAddr>;

    // Required method
    async fn to_socket_addrs_async(&self) -> Result<Self::Iter>;
}
Expand description

A trait for objects which can be converted or resolved to one or more SocketAddr values.

See std::net::ToSocketAddrs.

§Cancel safety

All implementation of ToSocketAddrsAsync in this crate is safe to cancel by dropping the future. The Glibc impl may leak the control block if the task is not completed when dropping.

Required Associated Types§

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ToSocketAddrsAsync for (&str, u16)

Source§

impl ToSocketAddrsAsync for (IpAddr, u16)

Source§

impl ToSocketAddrsAsync for (String, u16)

Source§

type Iter = <(&'static str, u16) as ToSocketAddrsAsync>::Iter

Source§

async fn to_socket_addrs_async(&self) -> Result<Self::Iter>

Source§

impl ToSocketAddrsAsync for (Ipv4Addr, u16)

Source§

impl ToSocketAddrsAsync for (Ipv6Addr, u16)

Source§

impl ToSocketAddrsAsync for SocketAddr

Source§

impl ToSocketAddrsAsync for str

Source§

type Iter = <(&'static str, u16) as ToSocketAddrsAsync>::Iter

Source§

async fn to_socket_addrs_async(&self) -> Result<Self::Iter>

Source§

impl ToSocketAddrsAsync for String

Source§

type Iter = <(&'static str, u16) as ToSocketAddrsAsync>::Iter

Source§

async fn to_socket_addrs_async(&self) -> Result<Self::Iter>

Source§

impl ToSocketAddrsAsync for SocketAddrV4

Source§

impl ToSocketAddrsAsync for SocketAddrV6

Source§

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

Source§

impl<T: ToSocketAddrsAsync + ?Sized> ToSocketAddrsAsync for &T

Implementors§