cidr::parsers

Function parse_any_cidr_full

source
pub fn parse_any_cidr_full<AP, HP>(
    s: &str,
    address_parser: AP,
    host_parser: HP,
) -> Result<AnyIpCidr, NetworkParseError>
Expand description

Parse AnyIpCidr with custom address and network (when no ‘/’ separator was found) parser

Return AnyIpCidr::Any for "any". If a ‘/’ is found, parse trailing number as prefix length and leading address with address_parser. Otherwise parse with host_parser.