Skip to main content

is_private_ip

Function is_private_ip 

Source
pub fn is_private_ip(ip: IpAddr) -> bool
Expand description

Returns true when the given IP is in a loopback, private (RFC 1918 / ULA), link-local, broadcast, unspecified, or documentation range. Also handles IPv4-mapped IPv6 addresses (::ffff:x.x.x.x).