Struct cidr_utils::utils::IpCidrCombiner[][src]

pub struct IpCidrCombiner { /* fields omitted */ }

To combine multiple IPv4 CIDRs and IPv6 CIDRs to supernetworks.

Implementations

impl IpCidrCombiner[src]

pub fn new() -> IpCidrCombiner[src]

Create a new IpCidrCombiner instance.

pub fn with_capacity(
    ipv4_capacity: usize,
    ipv6_capacity: usize
) -> IpCidrCombiner
[src]

Create a new IpCidrCombiner instance with specific capacities.

pub unsafe fn from_cidr_vec_unchecked(
    ipv4_cidr_vec: Vec<Ipv4Cidr>,
    ipv6_cidr_vec: Vec<Ipv6Cidr>
) -> IpCidrCombiner
[src]

pub fn into_ipv4_cidr_vec(self) -> Vec<Ipv4Cidr>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
[src]

pub fn into_ipv6_cidr_vec(self) -> Vec<Ipv6Cidr>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
[src]

impl IpCidrCombiner[src]

pub fn get_ipv4_cidrs(&self) -> &[Ipv4Cidr]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn get_ipv6_cidrs(&self) -> &[Ipv6Cidr]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

impl IpCidrCombiner[src]

pub fn push(&mut self, cidr: IpCidr)[src]

Push a CIDR into this combiner.

pub fn contains(&self, ip: IpAddr) -> bool[src]

Check an IP whether it is in these CIDRs.

pub fn ipv4_size(&self) -> u64[src]

pub fn ipv6_size(&self) -> BigUint[src]

Trait Implementations

impl Debug for IpCidrCombiner[src]

impl Default for IpCidrCombiner[src]

impl Display for IpCidrCombiner[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.