pub fn parse_any_cidr_full<AP, HP>(
s: &str,
address_parser: AP,
host_parser: HP,
) -> Result<AnyIpCidr, NetworkParseError>where
AP: FnOnce(&str) -> Result<IpAddr, AddrParseError>,
HP: FnOnce(&str) -> Result<IpCidr, 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
.