pub trait NetworkInterfaceExtension {
// Required methods
fn get_ipv4_nets(&self) -> Vec<Ipv4Network>;
fn get_ipv6_nets(&self) -> Vec<Ipv6Network>;
fn get_ipv4_range(&self) -> Option<Ipv4Network>;
}Expand description
Adds IP network extractor utilities to NetworkInterface.
Required Methods§
Sourcefn get_ipv4_nets(&self) -> Vec<Ipv4Network>
fn get_ipv4_nets(&self) -> Vec<Ipv4Network>
Collects all IPv4 properties from the interface.
Sourcefn get_ipv6_nets(&self) -> Vec<Ipv6Network>
fn get_ipv6_nets(&self) -> Vec<Ipv6Network>
Collects all IPv6 properties from the interface.
Sourcefn get_ipv4_range(&self) -> Option<Ipv4Network>
fn get_ipv4_range(&self) -> Option<Ipv4Network>
Extracts a singular, primary non-loopback IPv4 network if present.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".