pub struct IpCount {
pub ipv4: u64,
pub ipv6: Option<u128>,
}Expand description
The number of unique IP addresses covered by prefixes in the trie.
Returned by IpnetTrie::ip_count.
ipv4 uses u64 and can represent the entire IPv4 address space (2³²).
ipv6 is Option<u128>: Some(count) for values up to 2¹²⁸−1, and None
when the entire IPv6 address space (2¹²⁸ addresses) is covered — a value too
large to store in a u128.
Fields§
§ipv4: u64Number of unique IPv4 addresses covered (maximum 2³²).
ipv6: Option<u128>Number of unique IPv6 addresses covered, or None if the entire
IPv6 space (2¹²⁸) is covered.
Trait Implementations§
impl Copy for IpCount
impl Eq for IpCount
impl StructuralPartialEq for IpCount
Auto Trait Implementations§
impl Freeze for IpCount
impl RefUnwindSafe for IpCount
impl Send for IpCount
impl Sync for IpCount
impl Unpin for IpCount
impl UnsafeUnpin for IpCount
impl UnwindSafe for IpCount
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