[][src]Trait tokio::net::ToSocketAddrs

pub trait ToSocketAddrs: ToSocketAddrsPriv { }

Converts or resolves without blocking to one or more SocketAddr values.

DNS

Implementations of ToSocketAddrs for string types require a DNS lookup. These implementations are only provided when Tokio is used with the net feature flag.

Calling

Currently, this trait is only used as an argument to Tokio functions that need to reference a target socket address. To perform a SocketAddr conversion directly, use lookup_host().

This trait is sealed and is intended to be opaque. The details of the trait will change. Stabilization is pending enhancements to the Rust language.

Implementations on Foreign Types

impl<T: ToSocketAddrs + ?Sized, '_> ToSocketAddrs for &'_ T[src]

impl ToSocketAddrs for SocketAddr[src]

impl ToSocketAddrs for SocketAddrV4[src]

impl ToSocketAddrs for SocketAddrV6[src]

impl ToSocketAddrs for (IpAddr, u16)[src]

impl ToSocketAddrs for (Ipv4Addr, u16)[src]

impl ToSocketAddrs for (Ipv6Addr, u16)[src]

impl<'_> ToSocketAddrs for &'_ [SocketAddr][src]

impl ToSocketAddrs for str[src]

This is supported on crate feature net only.

impl<'_> ToSocketAddrs for (&'_ str, u16)[src]

This is supported on crate feature net only.

impl ToSocketAddrs for (String, u16)[src]

This is supported on crate feature net only.

impl ToSocketAddrs for String[src]

This is supported on crate feature net only.
Loading content...

Implementors

Loading content...