Skip to main content

is_valid_cidr

Function is_valid_cidr 

Source
pub fn is_valid_cidr(value: &str) -> bool
Expand description

Returns true for a canonical CIDR range such as 10.0.0.0/8, with no host bits set. Ambiguous forms (leading-zero or hex octets, IPv4-mapped IPv6) are rejected so client and server agree on which network a rule matches.