pub struct Nat64Prefix {
pub prefix: Ipv6Addr,
pub len: u8,
}Expand description
A NAT64 prefix (RFC 6052 section 2.2): its first len bits are the network’s.
Fields§
§prefix: Ipv6AddrThe prefix, the bits past len zero.
len: u832, 40, 48, 56, 64 or 96.
Implementations§
Source§impl Nat64Prefix
impl Nat64Prefix
Sourcepub fn new(addr: Ipv6Addr, len: u8) -> Option<Self>
pub fn new(addr: Ipv6Addr, len: u8) -> Option<Self>
The prefix of length len of addr (bits past it cleared); None for a length
RFC 6052 does not allow.
Sourcepub fn synthesize(&self, v4: Ipv4Addr) -> Ipv6Addr
pub fn synthesize(&self, v4: Ipv4Addr) -> Ipv6Addr
RFC 6052 section 2.2: v4 embedded under this prefix, the “u” octet (bits 64 to 71)
and the suffix zero.
Trait Implementations§
Source§impl Clone for Nat64Prefix
impl Clone for Nat64Prefix
impl Copy for Nat64Prefix
Source§impl Debug for Nat64Prefix
impl Debug for Nat64Prefix
impl Eq for Nat64Prefix
Source§impl PartialEq for Nat64Prefix
impl PartialEq for Nat64Prefix
impl StructuralPartialEq for Nat64Prefix
Auto Trait Implementations§
impl Forget for Nat64Prefix
impl Freeze for Nat64Prefix
impl Move for Nat64Prefix
impl RefUnwindSafe for Nat64Prefix
impl Send for Nat64Prefix
impl Sync for Nat64Prefix
impl Unpin for Nat64Prefix
impl UnsafeUnpin for Nat64Prefix
impl UnwindSafe for Nat64Prefix
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more