Skip to main content

ipv6_mask_to_prefix_checked

Function ipv6_mask_to_prefix_checked 

Source
pub const fn ipv6_mask_to_prefix_checked(mask: Ipv6Addr) -> Option<u8>
Expand description

Converts a Ipv6Addr network mask into a prefix.

If the mask is invalid this will return None. This is useful in const contexts where Option::unwrap may be called to trigger a compile-time error if the prefix is invalid.