@@ -22,9 +22,11 @@ use slice;
22
22
23
23
/// An internet socket address, either IPv4 or IPv6.
24
24
///
25
- /// This enum can contain either an [`SocketAddrV4`] or an [`SocketAddrV6`]. see their
26
- /// respective documentation for more details.
25
+ /// Internet socket addresses consist of an [IP address], a 16-bit port number, as well
26
+ /// as possibly some version-dependent additional information. See [`SocketAddrV4`]'s and
27
+ /// [`SocketAddrV6`]'s respective documentation for more details.
27
28
///
29
+ /// [IP address]: ../../std/net/enum.IpAddr.html
28
30
/// [`SocketAddrV4`]: ../../std/net/struct.SocketAddrV4.html
29
31
/// [`SocketAddrV6`]: ../../std/net/struct.SocketAddrV6.html
30
32
///
@@ -202,13 +204,12 @@ impl SocketAddr {
202
204
}
203
205
204
206
/// Returns [`true`] if the [IP address] in this `SocketAddr` is an
205
- /// [IPv4 address] and [`false`] if it's an [IPv6 address] .
207
+ /// [IPv4 address], and [`false`] otherwise .
206
208
///
207
209
/// [`true`]: ../../std/primitive.bool.html
208
210
/// [`false`]: ../../std/primitive.bool.html
209
211
/// [IP address]: ../../std/net/enum.IpAddr.html
210
212
/// [IPv4 address]: ../../std/net/enum.IpAddr.html#variant.V4
211
- /// [IPv6 address]: ../../std/net/enum.IpAddr.html#variant.V6
212
213
///
213
214
/// # Examples
214
215
///
@@ -230,12 +231,11 @@ impl SocketAddr {
230
231
}
231
232
232
233
/// Returns [`true`] if the [IP address] in this `SocketAddr` is an
233
- /// [IPv6 address] and [`false`] if it's an [IPv4 address] .
234
+ /// [IPv6 address], and [`false`] otherwise .
234
235
///
235
236
/// [`true`]: ../../std/primitive.bool.html
236
237
/// [`false`]: ../../std/primitive.bool.html
237
238
/// [IP address]: ../../std/net/enum.IpAddr.html
238
- /// [IPv4 address]: ../../std/net/enum.IpAddr.html#variant.V4
239
239
/// [IPv6 address]: ../../std/net/enum.IpAddr.html#variant.V6
240
240
///
241
241
/// # Examples
@@ -446,10 +446,10 @@ impl SocketAddrV6 {
446
446
447
447
/// Returns the flow information associated with this address.
448
448
///
449
- /// This information corresponds to the `sin6_flowinfo` field in C, as specified in
450
- /// [IETF RFC 2553, Section 3.3]. It combines information about the flow label and
451
- /// the traffic class as specified in [IETF RFC 2460], respectively [Section 6] and
452
- /// [Section 7].
449
+ /// This information corresponds to the `sin6_flowinfo` field in C's `netinet/in.h`,
450
+ /// as specified in [IETF RFC 2553, Section 3.3].
451
+ /// It combines information about the flow label and the traffic class as specified
452
+ /// in [IETF RFC 2460], respectively [Section 6] and [Section 7].
453
453
///
454
454
/// [IETF RFC 2553, Section 3.3]: https://tools.ietf.org/html/rfc2553#section-3.3
455
455
/// [IETF RFC 2460]: https://tools.ietf.org/html/rfc2460
@@ -491,8 +491,8 @@ impl SocketAddrV6 {
491
491
492
492
/// Returns the scope ID associated with this address.
493
493
///
494
- /// This information corresponds to the `sin6_scope_id` field in C, as specified in
495
- /// [IETF RFC 2553, Section 3.3].
494
+ /// This information corresponds to the `sin6_scope_id` field in C's `netinet/in.h`,
495
+ /// as specified in [IETF RFC 2553, Section 3.3].
496
496
///
497
497
/// [IETF RFC 2553, Section 3.3]: https://tools.ietf.org/html/rfc2553#section-3.3
498
498
///
@@ -743,12 +743,6 @@ pub trait ToSocketAddrs {
743
743
///
744
744
/// Note that this function may block the current thread while resolution is
745
745
/// performed.
746
- ///
747
- /// # Errors
748
- ///
749
- /// Any errors encountered during resolution will be returned as an [`Err`].
750
- ///
751
- /// [`Err`]: ../../std/result/enum.Result.html#variant.Err
752
746
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
753
747
fn to_socket_addrs ( & self ) -> io:: Result < Self :: Iter > ;
754
748
}
0 commit comments