IpPrivatePrefix

Trait IpPrivatePrefix 

Source
pub trait IpPrivatePrefix {
    // Required method
    fn is_private(&self) -> bool;
}
Expand description

Checks if the range of IP addresses are all for private use.

The IPv4 and IPv6 ranges are those specified by the IANA and IETF. The following tables sums up the ranges which are considered as private use by this trait:

RFCProtocolRangeDescription
RFC1918v410.0.0.0/8Private Use
RFC1918v4172.16.0.0/12Private Use
RFC1918v4192.168.0.0/16Private Use
RFC4193v664:ff9b:1::/48Private Use
RFC4193, RFC8190v6fc00::/7Private Use

Required Methods§

Source

fn is_private(&self) -> bool

Implementations on Foreign Types§

Source§

impl IpPrivatePrefix for Ipv4Addr

Source§

impl IpPrivatePrefix for Ipv6Addr

Source§

impl IpPrivatePrefix for Ipv4Net

Source§

impl IpPrivatePrefix for Ipv6Net

Implementors§