Struct cidr_utils::cidr::Ipv6Cidr[][src]

pub struct Ipv6Cidr { /* fields omitted */ }

To represent IPv6 CIDR.

Implementations

impl Ipv6Cidr[src]

pub fn get_prefix(&self) -> u128[src]

Get an integer which represents the prefix an IPv6 byte array of this CIDR in big-endian (BE) order.

pub fn get_prefix_as_u8_array(&self) -> [u8; 16][src]

pub fn get_prefix_as_u16_array(&self) -> [u16; 8][src]

pub fn get_prefix_as_ipv6_addr(&self) -> Ipv6Addr[src]

pub fn get_bits(&self) -> u8[src]

pub fn get_mask(&self) -> u128[src]

Get an integer which represents the prefix an IPv6 byte array of this CIDR in big-endian (BE) order.

pub fn get_mask_as_u8_array(&self) -> [u8; 16][src]

pub fn get_mask_as_u16_array(&self) -> [u16; 8][src]

pub fn get_mask_as_ipv6_addr(&self) -> Ipv6Addr[src]

impl Ipv6Cidr[src]

pub fn from_prefix_and_bits<P: Ipv6Able>(
    prefix: P,
    bits: u8
) -> Result<Ipv6Cidr, Ipv6CidrError>
[src]

pub fn from_prefix_and_mask<P: Ipv6Able, M: Ipv6Able>(
    prefix: P,
    mask: M
) -> Result<Ipv6Cidr, Ipv6CidrError>
[src]

pub fn from_str<S: AsRef<str>>(s: S) -> Result<Ipv6Cidr, Ipv6CidrError>[src]

pub fn is_ipv6_cidr<S: AsRef<str>>(s: S) -> bool[src]

impl Ipv6Cidr[src]

pub fn first(&self) -> u128[src]

Get an integer which represents the first IPv6 byte array of this CIDR in big-endian (BE) order.

pub fn first_as_u8_array(&self) -> [u8; 16][src]

pub fn first_as_u16_array(&self) -> [u16; 8][src]

pub fn first_as_ipv6_addr(&self) -> Ipv6Addr[src]

pub fn last(&self) -> u128[src]

Get an integer which represents the last IPv6 byte array of this CIDR in big-endian (BE) order.

pub fn last_as_u8_array(&self) -> [u8; 16][src]

pub fn last_as_u16_array(&self) -> [u16; 8][src]

pub fn last_as_ipv6_addr(&self) -> Ipv6Addr[src]

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

impl Ipv6Cidr[src]

pub fn contains<IP: Ipv6Able>(&self, ipv6: IP) -> bool[src]

impl Ipv6Cidr[src]

impl Ipv6Cidr[src]

impl Ipv6Cidr[src]

pub fn iter(&self) -> Ipv6CidrIterator

Notable traits for Ipv6CidrIterator

impl Iterator for Ipv6CidrIterator type Item = u128;
[src]

impl Ipv6Cidr[src]

Trait Implementations

impl Clone for Ipv6Cidr[src]

impl Copy for Ipv6Cidr[src]

impl Debug for Ipv6Cidr[src]

impl Display for Ipv6Cidr[src]

impl Eq for Ipv6Cidr[src]

impl FromStr for Ipv6Cidr[src]

type Err = Ipv6CidrError

The associated error which can be returned from parsing.

impl Hash for Ipv6Cidr[src]

impl Ord for Ipv6Cidr[src]

impl PartialEq<IpCidr> for Ipv6Cidr[src]

impl PartialEq<Ipv6Cidr> for Ipv6Cidr[src]

impl PartialEq<Ipv6Cidr> for IpCidr[src]

impl PartialOrd<IpCidr> for Ipv6Cidr[src]

impl PartialOrd<Ipv6Cidr> for Ipv6Cidr[src]

impl PartialOrd<Ipv6Cidr> for IpCidr[src]

impl StructuralEq for Ipv6Cidr[src]

impl StructuralPartialEq for Ipv6Cidr[src]

impl TryFrom<&'_ str> for Ipv6Cidr[src]

type Error = Ipv6CidrError

The type returned in the event of a conversion error.

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.