Function parse_nat64_prefixes
pub fn parse_nat64_prefixes(
prefixes: &[String],
label: &str,
) -> Result<Vec<Nat64Prefix>, Error>Expand description
Operator-declared, network-specific RFC 6052 NAT64 prefixes, and the parser that turns the configured strings into them.
Public because the tools that hold a prefix list name the type in their constructor signatures. Malformed input rejects the whole list, so a tool that cannot parse its configuration fails construction rather than running with a silently narrowed egress boundary. Parse a whole operator-authored NAT64 prefix list, sorted and deduplicated.
label names the configuration surface in the error message so the
operator can find the offending entry (for example
"security.nat64_prefixes").
§Errors
Returns an error naming every rejected entry, with the reason it was
rejected, when one or more entries fail Nat64Prefix::parse.
A malformed list is never silently reduced to its well-formed subset. One bad entry rejects the whole list so that a typo fails the caller closed instead of quietly narrowing the validation boundary — a list that parsed to “no prefixes” would look exactly like a deployment that runs no NAT64 translator, and would disable network-specific classification without any signal.