pub trait ToIpv4Netmask {
// Required method
fn prefix(&self) -> Result<u8>;
// Provided method
fn netmask(&self) -> Result<Ipv4Addr> { ... }
}Available on Windows, or Linux and non-
target_env=ohos, or macOS, or FreeBSD, or OpenBSD, or NetBSD only.Expand description
Trait for converting various types into an IPv4 netmask (prefix length).