diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-09-25 20:31:58 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-25 20:31:58 +1000 |
| commit | 3053a18ec92fba1adc28997fb1784a671bdb82a3 (patch) | |
| tree | 1cbfb50d4dd59ef6493736f00cb76ec9e882c2f3 /library/std | |
| parent | 62aa0ae29f483d685745a4795c9cc65e2a1171e6 (diff) | |
| parent | 852da23a2d06de5a7821b1fdb356fe3a410b2d00 (diff) | |
| download | rust-3053a18ec92fba1adc28997fb1784a671bdb82a3.tar.gz rust-3053a18ec92fba1adc28997fb1784a671bdb82a3.zip | |
Rollup merge of #147007 - LawnGnome:tosocketaddrs-doc, r=tgross35
Explicitly note `&[SocketAddr]` impl of `ToSocketAddrs` Although the examples below this list do imply that there's an impl of `ToSocketAddrs` for `&[SocketAddr]`, it's not actually noted in the list of default implementations.
Diffstat (limited to 'library/std')
| -rw-r--r-- | library/std/src/net/socket_addr.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/net/socket_addr.rs b/library/std/src/net/socket_addr.rs index 5b56dd3f744..8214ad381f1 100644 --- a/library/std/src/net/socket_addr.rs +++ b/library/std/src/net/socket_addr.rs @@ -28,6 +28,8 @@ use crate::{io, iter, option, slice, vec}; /// [`SocketAddr`] as expected by its [`FromStr`] implementation or a string like /// `<host_name>:<port>` pair where `<port>` is a [`u16`] value. /// +/// * <code>&[[SocketAddr]]</code>: all [`SocketAddr`] values in the slice will be used. +/// /// This trait allows constructing network objects like [`TcpStream`] or /// [`UdpSocket`] easily with values of various types for the bind/connection /// address. It is needed because sometimes one type is more appropriate than |
