Crate cidr [−] [src]
This library provides types to represent an IP network (Cidr
) or
an IP host withing a network (Inet
)
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).
Structs
InetIterator |
Iterator type to iterate over a list of IP addresses in a network |
Ipv4Cidr |
|
Ipv4Inet |
|
Ipv6Cidr |
|
Ipv6Inet |
|
NetworkLengthTooLongError |
Error returned when the network length was longer than the address |
Enums
Family |
Represents the type of an IP address |
IpCidr |
|
IpInet |
|
NetworkParseError |
Error type returned when parsing IP networks |
Traits
Cidr |
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
|
Inet |
Types implementing Inet represent IP hosts within networks. |