mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 21:47:15 +03:00
941bf8bee1
Stabilise `IpvNAddr::{BITS, to_bits, from_bits}` (`ip_bits`)
This completed FCP in #113744. (Closes #113744.)
Stabilises the following APIs:
```rust
impl Ipv4Addr {
pub const BITS: u32 = 32;
pub const fn from_bits(bits: u32) -> Ipv4Addr;
pub const fn to_bits(self) -> u32;
}
impl Ipv6Addr {
pub const BITS: u32 = 128;
pub const fn from_bits(bits: u128) -> Ipv4Addr;
pub const fn to_bits(self) -> u128;
}
```