File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -1120,6 +1120,7 @@ impl Ord for Ipv4Addr {
1120
1120
1121
1121
#[ stable( feature = "ip_u32" , since = "1.1.0" ) ]
1122
1122
impl From < Ipv4Addr > for u32 {
1123
+ /// Uses [`Ipv4Addr::to_bits`] to convert an IPv4 address to a host byte order `u32`.
1123
1124
#[ inline]
1124
1125
fn from ( ip : Ipv4Addr ) -> u32 {
1125
1126
ip. to_bits ( )
@@ -1128,6 +1129,7 @@ impl From<Ipv4Addr> for u32 {
1128
1129
1129
1130
#[ stable( feature = "ip_u32" , since = "1.1.0" ) ]
1130
1131
impl From < u32 > for Ipv4Addr {
1132
+ /// Uses [`Ipv4Addr::from_bits`] to convert a host byte order `u32` into an IPv4 address.
1131
1133
#[ inline]
1132
1134
fn from ( ip : u32 ) -> Ipv4Addr {
1133
1135
Ipv4Addr :: from_bits ( ip)
@@ -1995,13 +1997,15 @@ impl Ord for Ipv6Addr {
1995
1997
1996
1998
#[ stable( feature = "i128" , since = "1.26.0" ) ]
1997
1999
impl From < Ipv6Addr > for u128 {
2000
+ /// Uses [`Ipv6Addr::to_bits`] to convert an IPv6 address to a host byte order `u128`.
1998
2001
#[ inline]
1999
2002
fn from ( ip : Ipv6Addr ) -> u128 {
2000
2003
ip. to_bits ( )
2001
2004
}
2002
2005
}
2003
2006
#[ stable( feature = "i128" , since = "1.26.0" ) ]
2004
2007
impl From < u128 > for Ipv6Addr {
2008
+ /// Uses [`Ipv6Addr::from_bits`] to convert a host byte order `u128` to an IPv6 address.
2005
2009
#[ inline]
2006
2010
fn from ( ip : u128 ) -> Ipv6Addr {
2007
2011
Ipv6Addr :: from_bits ( ip)
You can’t perform that action at this time.
0 commit comments