Skip to content

Commit

Permalink
Add links to Ipv*Addr methods in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mathphreak committed Jul 7, 2016
1 parent fee5b49 commit 58da5dd
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/libstd/net/ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ pub enum Ipv6MulticastScope {
}

impl IpAddr {
/// Returns true for the special 'unspecified' address (0.0.0.0 in IPv4, :: in IPv6).
/// Returns true for the special 'unspecified' address ([IPv4], [IPv6]).
/// [IPv4]: ../../std/net/struct.Ipv4Addr.html#method.is_unspecified
/// [IPv6]: ../../std/net/struct.Ipv6Addr.html#method.is_unspecified
#[unstable(feature="ip", issue="27709",

This comment has been minimized.

Copy link
@therealbstern

therealbstern Jul 19, 2016

Contributor

Can we remove these unstable marks? I believe is_unspecified is now accepted as stable for both address families.

This comment has been minimized.

Copy link
@alexcrichton

alexcrichton Jul 19, 2016

Member

Soon! These APIs were just added and the libs team goes through a "final comment period" for stabilizing APIs. These APIs are slated to become stable in 1.12, though, tracked at #27709

reason="recently added and depends on unstable Ipv4Addr.is_unspecified()")]
pub fn is_unspecified(&self) -> bool {
Expand All @@ -70,7 +72,9 @@ impl IpAddr {
}
}

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

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

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

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

0 comments on commit 58da5dd

Please sign in to comment.