ipnet

Function ipv4_mask_to_prefix

Source
pub fn ipv4_mask_to_prefix(mask: Ipv4Addr) -> Result<u8, PrefixLenError>
Expand description

Converts a Ipv4Addr network mask into a prefix.

ยงErrors

If the mask is invalid this will return an PrefixLenError.