pub trait IpAddrExt {
// Required method
fn is_private(&self) -> bool;
}Expand description
Extension trait for IpAddr to provide is_private() method.
Required Methods§
Sourcefn is_private(&self) -> bool
fn is_private(&self) -> bool
Returns true if this address is in a private range.
For IPv4, checks if the address is in a private network range. For IPv6, checks if the address is a unique local address (fc00::/7).