diff options
author | Carl Lerche <me@carllerche.com> | 2020-01-13 14:44:06 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-13 14:44:06 -0800 |
commit | eb1a8e1792b2c4b296be47a0681421c90bbdbf7a (patch) | |
tree | 602f3642f60167f8753c90cb170dcbaa34247ffb /tokio/src/net/addr.rs | |
parent | 5b091fa3f0c3a06047d02ca6892f75c3e15040df (diff) |
stream: add `StreamExt::collect()` (#2109)
Provides an asynchronous equivalent to `Iterator::collect()`. A sealed
`FromStream` trait is added. Stabilization is pending Rust supporting
`async` trait fns.
Diffstat (limited to 'tokio/src/net/addr.rs')
-rw-r--r-- | tokio/src/net/addr.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tokio/src/net/addr.rs b/tokio/src/net/addr.rs index 8e3bf434..d8d89c40 100644 --- a/tokio/src/net/addr.rs +++ b/tokio/src/net/addr.rs @@ -14,12 +14,11 @@ use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV /// # Calling /// /// Currently, this trait is only used as an argument to Tokio functions that -/// need to reference a target socket address. +/// need to reference a target socket address. To perform a `SocketAddr` +/// conversion directly, use [`lookup_host()`](super::lookup_host()). /// -/// This trait is sealed and is intended to be opaque. Users of Tokio should -/// only use `ToSocketAddrs` in trait bounds and __must not__ attempt to call -/// the functions directly or reference associated types. Changing these is not -/// considered a breaking change. +/// This trait is sealed and is intended to be opaque. The details of the trait +/// will change. Stabilization is pending enhancements to the Rust langague. pub trait ToSocketAddrs: sealed::ToSocketAddrsPriv {} type ReadyFuture<T> = future::Ready<io::Result<T>>; |