File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -1104,12 +1104,20 @@ impl Ipv6Addr {
1104
1104
///
1105
1105
/// - the loopback address
1106
1106
/// - the link-local addresses
1107
- /// - the (deprecated) site-local addresses
1108
1107
/// - unique local addresses
1109
1108
/// - the unspecified address
1110
1109
/// - the address range reserved for documentation
1111
1110
///
1111
+ /// This method returns [`true`] for site-local addresses as per [RFC 4291 section 2.5.7]
1112
+ ///
1113
+ /// ```no_rust
1114
+ /// The special behavior of [the site-local unicast] prefix defined in [RFC3513] must no longer
1115
+ /// be supported in new implementations (i.e., new implementations must treat this prefix as
1116
+ /// Global Unicast).
1117
+ /// ```
1118
+ ///
1112
1119
/// [`true`]: ../../std/primitive.bool.html
1120
+ /// [RFC 4291 section 2.5.7]: https://tools.ietf.org/html/rfc4291#section-2.5.7
1113
1121
///
1114
1122
/// # Examples
1115
1123
///
@@ -1126,9 +1134,11 @@ impl Ipv6Addr {
1126
1134
/// ```
1127
1135
pub fn is_unicast_global ( & self ) -> bool {
1128
1136
!self . is_multicast ( )
1129
- && !self . is_loopback ( ) && !self . is_unicast_link_local ( )
1130
- && !self . is_unicast_site_local ( ) && !self . is_unique_local ( )
1131
- && !self . is_unspecified ( ) && !self . is_documentation ( )
1137
+ && !self . is_loopback ( )
1138
+ && !self . is_unicast_link_local ( )
1139
+ && !self . is_unique_local ( )
1140
+ && !self . is_unspecified ( )
1141
+ && !self . is_documentation ( )
1132
1142
}
1133
1143
1134
1144
/// Returns the address's multicast scope if the address is multicast.
You can’t perform that action at this time.
0 commit comments