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
14
/// Errors returned when parsing or constructing IP CIDR blocks.
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum IpCidrError {
    /// Input string was empty.
    EmptyInput,
    /// IP address portion could not be parsed.
    InvalidIpAddress,
    /// Prefix length was missing, malformed, or exceeded the address bit width.
    InvalidPrefixLength,
    /// Input syntax did not match expected CIDR format.
    InvalidSyntax,
    /// Strict construction rejected non-zero host bits in the network address.
    NonCanonicalNetwork,
}