pub type IPv6 = U128<NetworkEndian>;Expand description
The underlying value (u128) and trait impl for AFI 2. Exactly fitting IPv6 bytes (16 octets).
Aliased Type§
pub struct IPv6(/* private fields */);Trait Implementations§
Source§impl AddressFamily for IPv6
impl AddressFamily for IPv6
Source§type InnerIpAddr = Ipv6Addr
type InnerIpAddr = Ipv6Addr
The std::net that the value of self belongs to. So,
std::net::Ipv4Addr, and std::net::Ipv6Addr for IPv4, and IPv6
respectively.
fn zero() -> Self
fn from_ipaddr(ip_addr: Self::InnerIpAddr) -> Self
fn into_bit_span(net: Self, start_bit: u8, len: u8) -> BitSpan
Source§fn add_bit_span(self, len: u8, bs: BitSpan) -> (Self, u8)
fn add_bit_span(self, len: u8, bs: BitSpan) -> (Self, u8)
Treat self as a prefix and append the given bitspan to it.
Source§fn truncate_to_len(self, len: u8) -> Self
fn truncate_to_len(self, len: u8) -> Self
fill the bits after the specified len with zeros. Interpreted as an IP
Prefix, this means that self will be truncated to the specified len.
Source§fn into_ipaddr(self) -> IpAddr
fn into_ipaddr(self) -> IpAddr
Turn self in to a std::net::IpAddr.
Source§fn dangerously_truncate_to_u32(self) -> u32
fn dangerously_truncate_to_u32(self) -> u32
Truncate self to a u32. For IPv4 this is a NOP. For IPv6 this
truncates to 32 bits.