Expand description
Extra parsers
The FromStr implementations in this crate are rather strict
about the allowed input. Depending on the data format that needs
to be handled the functions here might help implementing custom
parsers.
The parser combinators that take an address_parser can either
take FromStr::from_str or a non-default parser like parse_loose_ip.
They are used to parse addresses (either as part of a "/" separated
notation or as single host).
Parser combinators that take an additional host_parser use that
to parse strings that don’t have an "/" separator - usually these
should return Cidr/Inet “host” values, but they can allow special
syntax like parse_short_ip_cidr to represent non-host networks too.
Functions§
- inet_
addr - Parse “loose” IPv4 address similar to POSIX
inet_addr - parse_
any_ cidr - Parse
AnyIpCidrwith custom address parser - parse_
any_ cidr_ full - Parse
AnyIpCidrwith custom address and network (when no ‘/’ separator was found) parser - parse_
any_ cidr_ full_ ignore_ hostbits - Parse
AnyIpCidrwith custom address and network (when no ‘/’ separator was found) parser - parse_
any_ cidr_ ignore_ hostbits - Parse
AnyIpCidrwith custom address parser - parse_
cidr - Parse
Cidrwith custom address parser - parse_
cidr_ full - Parse
Cidrwith custom address and network (when no ‘/’ separator was found) parser - parse_
cidr_ full_ ignore_ hostbits - Parse
Cidrwith custom address and network (when no ‘/’ separator was found) parser - parse_
cidr_ ignore_ hostbits - Parse
Cidrwith custom address parser - parse_
inet - Parse
Inetwith custom address parser - parse_
inet_ full - Parse
Inetwith custom address and network (when no ‘/’ separator was found) parser - parse_
loose_ ip - Parse IP address; fall back to
inet_addrif normal parser fails - parse_
loose_ ipv4 - Parse IPv4 address; fall back to
inet_addrif normal parser fails - parse_
short_ any_ ip_ cidr - Parses normal IP CIDR notations,
"any"or short IPv4 forms viaparse_short_ipv4_address_as_cidr - parse_
short_ ip_ address_ as_ cidr - Parses normal IP addresses as host addresses, and short IPv4 addresses via
parse_short_ipv4_address_as_cidr - parse_
short_ ip_ cidr - Parses normal IP CIDR notations or short IPv4 forms via
parse_short_ipv4_address_as_cidr - parse_
short_ ipv4_ address_ as_ cidr - Parse “short” IPv4 addresses as networks with octet-aligned length
- parse_
short_ ipv4_ cidr - Parses normal IPv4 CIDR notations or short forms via
parse_short_ipv4_address_as_cidr