Enum ipnetwork::NetworkSize
source · pub enum NetworkSize {
V4(u32),
V6(u128),
}
Expand description
Represents a generic network size. For IPv4, the max size is a u32 and for IPv6, it is a u128
Variants§
Trait Implementations§
source§impl Clone for NetworkSize
impl Clone for NetworkSize
source§fn clone(&self) -> NetworkSize
fn clone(&self) -> NetworkSize
Returns a copy 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 NetworkSize
impl Debug for NetworkSize
source§impl Hash for NetworkSize
impl Hash for NetworkSize
source§impl Ord for NetworkSize
impl Ord for NetworkSize
source§fn cmp(&self, other: &NetworkSize) -> Ordering
fn cmp(&self, other: &NetworkSize) -> 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 for NetworkSize
impl PartialEq for NetworkSize
source§fn eq(&self, other: &NetworkSize) -> bool
fn eq(&self, other: &NetworkSize) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for NetworkSize
impl PartialOrd for NetworkSize
source§fn partial_cmp(&self, other: &NetworkSize) -> Option<Ordering>
fn partial_cmp(&self, other: &NetworkSize) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for NetworkSize
impl Eq for NetworkSize
impl StructuralPartialEq for NetworkSize
Auto Trait Implementations§
impl Freeze for NetworkSize
impl RefUnwindSafe for NetworkSize
impl Send for NetworkSize
impl Sync for NetworkSize
impl Unpin for NetworkSize
impl UnwindSafe for NetworkSize
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