This library provides types to represent an IP network (
an IP host withing a network (
The naming follows the names of the PostgreSQL data types
Address parsing also accepts IPv4 address with less than four octets (but always parses those as decimal).
This feature is enabled by default (not using
In human readable formats the
FromStr interfaces are
used. Otherwise all values are serialized in the same format (apart
from the newtype wrapping) as a tuple of two values:
0x00...0x20: IPv4 with network length
0x40...0xc0: IPv6 with network length
tag - 0x40
- address according to
[u8; 16]) or
Iterator type to iterate over a list of IP addresses in a network
Error returned when the network length was longer than the address
Represents either an IPv4 or an IPv6 network or "any".
Represents the type of an IP address
Error type returned when parsing IP networks
Types implementing Cidr represent IP networks. An IP network in
this case is a set of IP addresses which share a common prefix (when
viewed as a bitstring). The length of this prefix is called
Types implementing Inet represent IP hosts within networks.