Skip to content

Commit 58da5dd

Browse files
committed
Add links to Ipv*Addr methods in docs
per #34694 (comment)
1 parent fee5b49 commit 58da5dd

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

src/libstd/net/ip.rs

+15-5
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ pub enum Ipv6MulticastScope {
6060
}
6161

6262
impl IpAddr {
63-
/// Returns true for the special 'unspecified' address (0.0.0.0 in IPv4, :: in IPv6).
63+
/// Returns true for the special 'unspecified' address ([IPv4], [IPv6]).
64+
/// [IPv4]: ../../std/net/struct.Ipv4Addr.html#method.is_unspecified
65+
/// [IPv6]: ../../std/net/struct.Ipv6Addr.html#method.is_unspecified
6466
#[unstable(feature="ip", issue="27709",
6567
reason="recently added and depends on unstable Ipv4Addr.is_unspecified()")]
6668
pub fn is_unspecified(&self) -> bool {
@@ -70,7 +72,9 @@ impl IpAddr {
7072
}
7173
}
7274

73-
/// Returns true if this is a loopback address (127.0.0.0/8 in IPv4, ::1 in IPv6).
75+
/// Returns true if this is a loopback address ([IPv4], [IPv6]).
76+
/// [IPv4]: ../../std/net/struct.Ipv4Addr.html#method.is_loopback
77+
/// [IPv6]: ../../std/net/struct.Ipv6Addr.html#method.is_loopback
7478
#[unstable(feature="ip", reason="recently added", issue="27709")]
7579
pub fn is_loopback(&self) -> bool {
7680
match *self {
@@ -79,7 +83,9 @@ impl IpAddr {
7983
}
8084
}
8185

82-
/// Returns true if the address appears to be globally routable.
86+
/// Returns true if the address appears to be globally routable ([IPv4], [IPv6]).
87+
/// [IPv4]: ../../std/net/struct.Ipv4Addr.html#method.is_global
88+
/// [IPv6]: ../../std/net/struct.Ipv6Addr.html#method.is_global
8389
#[unstable(feature="ip", issue="27709",
8490
reason="recently added and depends on unstable Ip{v4,v6}Addr.is_global()")]
8591
pub fn is_global(&self) -> bool {
@@ -89,7 +95,9 @@ impl IpAddr {
8995
}
9096
}
9197

92-
/// Returns true if this is a multicast address (224.0.0.0/4 in IPv4, ff00::/8 in IPv6)
98+
/// Returns true if this is a multicast address ([IPv4], [IPv6]).
99+
/// [IPv4]: ../../std/net/struct.Ipv4Addr.html#method.is_multicast
100+
/// [IPv6]: ../../std/net/struct.Ipv6Addr.html#method.is_multicast
93101
#[unstable(feature="ip", reason="recently added", issue="27709")]
94102
pub fn is_multicast(&self) -> bool {
95103
match *self {
@@ -98,7 +106,9 @@ impl IpAddr {
98106
}
99107
}
100108

101-
/// Returns true if this address is in a range designated for documentation.
109+
/// Returns true if this address is in a range designated for documentation ([IPv4], [IPv6]).
110+
/// [IPv4]: ../../std/net/struct.Ipv4Addr.html#method.is_documentation
111+
/// [IPv6]: ../../std/net/struct.Ipv6Addr.html#method.is_documentation
102112
#[unstable(feature="ip", issue="27709",
103113
reason="recently added and depends on unstable Ipv6Addr.is_documentation()")]
104114
pub fn is_documentation(&self) -> bool {

0 commit comments

Comments
 (0)