pub struct Ipv6NetPrefix { /* private fields */ }Expand description
An Ipv6 prefix limited to 64 bits (EXPERIMENTAL)
In many applications, managed Ipv6 prefixes are never longer than 64 bits which contains any routing prefix. In these cases, it is possible to save memory space by encoding it in 64 bits with one more byte to encode the prefix length.
|------------ 64 bits ----------------|--8 bits--|
ip prefix slot lengthImplementations§
Source§impl Ipv6NetPrefix
impl Ipv6NetPrefix
pub const fn new(ip: Ipv6Addr, len: u8) -> Result<Self, PrefixLenError>
pub const fn new_assert(ip: Ipv6Addr, len: u8) -> Self
Trait Implementations§
Source§impl Clone for Ipv6NetPrefix
impl Clone for Ipv6NetPrefix
Source§fn clone(&self) -> Ipv6NetPrefix
fn clone(&self) -> Ipv6NetPrefix
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Ipv6NetPrefix
impl Debug for Ipv6NetPrefix
Source§impl Default for Ipv6NetPrefix
impl Default for Ipv6NetPrefix
Source§fn default() -> Ipv6NetPrefix
fn default() -> Ipv6NetPrefix
Returns the “default value” for a type. Read more
Source§impl Display for Ipv6NetPrefix
impl Display for Ipv6NetPrefix
Source§impl From<Ipv6NetPrefix> for IpNet
impl From<Ipv6NetPrefix> for IpNet
Source§fn from(value: Ipv6NetPrefix) -> Self
fn from(value: Ipv6NetPrefix) -> Self
Converts to this type from the input type.
Source§impl From<Ipv6NetPrefix> for Ipv6Net
impl From<Ipv6NetPrefix> for Ipv6Net
Source§fn from(value: Ipv6NetPrefix) -> Self
fn from(value: Ipv6NetPrefix) -> Self
Converts to this type from the input type.
Source§impl From<Ipv6NetPrefix> for Ipv6Prefix
impl From<Ipv6NetPrefix> for Ipv6Prefix
Source§fn from(value: Ipv6NetPrefix) -> Self
fn from(value: Ipv6NetPrefix) -> Self
Converts to this type from the input type.
Source§impl FromStr for Ipv6NetPrefix
impl FromStr for Ipv6NetPrefix
Source§impl Hash for Ipv6NetPrefix
impl Hash for Ipv6NetPrefix
Source§impl IpPrefix for Ipv6NetPrefix
impl IpPrefix for Ipv6NetPrefix
Source§fn bitslot_trunc(&self) -> Self::Slot
fn bitslot_trunc(&self) -> Self::Slot
The inner slot with all the masked bits set to 0. Read more
Source§impl IpPrefixCovering<Ipv6Addr> for Ipv6NetPrefix
impl IpPrefixCovering<Ipv6Addr> for Ipv6NetPrefix
Source§impl IpPrefixCovering<Ipv6Net> for Ipv6NetPrefix
impl IpPrefixCovering<Ipv6Net> for Ipv6NetPrefix
Source§impl IpPrefixCovering<Ipv6NetPrefix> for Ipv6Net
impl IpPrefixCovering<Ipv6NetPrefix> for Ipv6Net
Source§impl IpPrefixCovering<Ipv6NetPrefix> for Ipv6Prefix
impl IpPrefixCovering<Ipv6NetPrefix> for Ipv6Prefix
Source§impl IpPrefixCovering<Ipv6Prefix> for Ipv6NetPrefix
impl IpPrefixCovering<Ipv6Prefix> for Ipv6NetPrefix
Source§impl IpPrefixShortening for Ipv6NetPrefix
impl IpPrefixShortening for Ipv6NetPrefix
Source§impl IpPrivatePrefix for Ipv6NetPrefix
impl IpPrivatePrefix for Ipv6NetPrefix
fn is_private(&self) -> bool
Source§impl IpRootPrefix for Ipv6NetPrefix
impl IpRootPrefix for Ipv6NetPrefix
Source§impl Ord for Ipv6NetPrefix
impl Ord for Ipv6NetPrefix
Source§fn cmp(&self, other: &Ipv6NetPrefix) -> Ordering
fn cmp(&self, other: &Ipv6NetPrefix) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq<Ipv6Net> for Ipv6NetPrefix
impl PartialEq<Ipv6Net> for Ipv6NetPrefix
Source§impl PartialEq<Ipv6NetPrefix> for Ipv6Net
impl PartialEq<Ipv6NetPrefix> for Ipv6Net
Source§impl PartialEq<Ipv6NetPrefix> for Ipv6Prefix
impl PartialEq<Ipv6NetPrefix> for Ipv6Prefix
Source§impl PartialEq<Ipv6Prefix> for Ipv6NetPrefix
impl PartialEq<Ipv6Prefix> for Ipv6NetPrefix
Source§impl PartialEq for Ipv6NetPrefix
impl PartialEq for Ipv6NetPrefix
Source§impl PartialOrd for Ipv6NetPrefix
impl PartialOrd for Ipv6NetPrefix
Source§impl TryFrom<Ipv6Net> for Ipv6NetPrefix
impl TryFrom<Ipv6Net> for Ipv6NetPrefix
Source§impl TryFrom<Ipv6Prefix> for Ipv6NetPrefix
impl TryFrom<Ipv6Prefix> for Ipv6NetPrefix
Source§type Error = IpPrefixError
type Error = IpPrefixError
The type returned in the event of a conversion error.
impl Copy for Ipv6NetPrefix
impl Eq for Ipv6NetPrefix
impl StructuralPartialEq for Ipv6NetPrefix
Auto Trait Implementations§
impl Freeze for Ipv6NetPrefix
impl RefUnwindSafe for Ipv6NetPrefix
impl Send for Ipv6NetPrefix
impl Sync for Ipv6NetPrefix
impl Unpin for Ipv6NetPrefix
impl UnwindSafe for Ipv6NetPrefix
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