pub fn ip_mask_to_prefix(mask: IpAddr) -> Result<u8, IpNetworkError>
Expand description
Converts a IpAddr
network mask into a prefix.
If the mask is invalid this will return an IpNetworkError::InvalidPrefix
.
pub fn ip_mask_to_prefix(mask: IpAddr) -> Result<u8, IpNetworkError>
Converts a IpAddr
network mask into a prefix.
If the mask is invalid this will return an IpNetworkError::InvalidPrefix
.