cidr::parsers

Function parse_inet_full

Source
pub fn parse_inet_full<I, AP, HP>(
    s: &str,
    address_parser: AP,
    host_parser: HP,
) -> Result<I, NetworkParseError>
where I: Inet, AP: FnOnce(&str) -> Result<I::Address, AddrParseError>, HP: FnOnce(&str) -> Result<I, NetworkParseError>,
Expand description

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

If a ‘/’ is found, parse trailing number as prefix length and leading address with address_parser. Otherwise parse with host_parser.