Skip to main content

to_cidr

Function to_cidr 

Source
fn to_cidr(ip: IpAddr, prefix_len: u8) -> Option<String>
Expand description

Formats ip in CIDR notation with the host bits cleared, or returns None if prefix_len is longer than the address.