pub trait Ipv4CidrSize {
    // Required method
    fn size(&self) -> u64;
}
Expand description

Get the size of an Ipv4Cidr.

Examples

use std::str::FromStr;

use cidr::Ipv4Cidr;
use cidr_utils::Ipv4CidrSize;

let cidr = Ipv4Cidr::from_str("192.168.1.0/24").unwrap();

assert_eq!(256, cidr.size());

Required Methods§

source

fn size(&self) -> u64

Implementations on Foreign Types§

source§

impl Ipv4CidrSize for Ipv4Cidr

source§

fn size(&self) -> u64

Implementors§