cidr-radix 11.2.0

Zero-dependency, zero-allocation IPv4/IPv6 CIDR parsing, bitmask matching, canonicalization, and radix-indexed IpCidrSet lookup.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use super::*;

/// Optional 256-entry `/8` radix bucket directory.
pub(crate) type RadixBuckets = Option<Box<[u64; RADIX_BUCKET_COUNT]>>;

/// Common-prefix L2 sub-table descriptor `(prefix_val, prefix_mask, shift_and_mask, offset)`.
pub(crate) type V6SubTableMeta = (u128, u128, u32, u32);

/// Compiled IPv4 radix index pair `(l1_buckets, l2_sub_buckets)`.
pub(crate) type V4RadixIndex = (RadixBuckets, Vec<u64>);

/// Compiled IPv6 radix index triple `(l1_buckets, l2_sub_meta, l2_sub_buckets)`.
pub(crate) type V6RadixIndex = (RadixBuckets, Vec<V6SubTableMeta>, Vec<u64>);