Module functions

Source
Available on crate feature postgres_backend only.
Expand description

PostgreSQL specific functions

Functions§

abbrev
Creates an abbreviated display format as text.
broadcast
Computes the broadcast address for the address’s network.
family
Returns the address’s family: 4 for IPv4, 6 for IPv6.
host
Returns the IP address as text, ignoring the netmask.
hostmask
Computes the host mask for the address’s network.
inet_merge
Computes the smallest network that includes both of the given networks.
inet_same_family
Tests whether the addresses belong to the same IP family.
masklen
Returns the netmask length in bits.
netmask
Computes the network mask for the address’s network.
network
Returns the network part of the address, zeroing out whatever is to the right of the netmask. (This is equivalent to casting the value to cidr.)
set_masklen
Sets the netmask length for an inet or cidr value. For inet, the address part does not changes. For cidr, address bits to the right of the new netmask are set to zero.

Type Aliases§

abbrev
The return type of abbrev()
broadcast
The return type of broadcast()
family
The return type of family()
host
The return type of host()
hostmask
The return type of hostmask()
inet_merge
The return type of inet_merge()
inet_same_family
The return type of inet_same_family()
masklen
The return type of masklen()
netmask
The return type of netmask()
network
The return type of network()
set_masklen
The return type of set_masklen()