Struct asyncio::ip::PrefixIpAddrV6 [] [src]

pub struct PrefixIpAddrV6 { /* fields omitted */ }

Implements Prefix IP version 6 style addresses.

Methods

impl PrefixIpAddrV6
[src]

Returns new PrefixIpAddrV6.

Examples

use asyncio::ip::{IpAddrV6, PrefixIpAddrV6};

assert!(PrefixIpAddrV6::new(IpAddrV6::loopback(),
                            IpAddrV6::new(0xffff,0xffff,0xffff,0xffff,0,0,0,0)).is_some());

assert!(PrefixIpAddrV6::new(IpAddrV6::loopback(),
                            IpAddrV6::any()).is_none());

Returns new PrefixIpAddrV6.

Panics

Panics if len == 0 or len > 128

use asyncio::ip::{IpAddrV6, PrefixIpAddrV6};

PrefixIpAddrV6::from(IpAddrV6::loopback(), 0);  // panic!

Returns a prefix address.

Examples

use asyncio::ip::{IpAddrV6, PrefixIpAddrV6};

let lo = PrefixIpAddrV6::from(IpAddrV6::loopback(), 64);
assert_eq!(lo.prefix(), IpAddrV6::any());

Returns a subnet mask.

Examples

use asyncio::ip::{IpAddrV6, PrefixIpAddrV6};

let lo = PrefixIpAddrV6::from(IpAddrV6::loopback(), 64);
assert_eq!(lo.netmask(), IpAddrV6::new(0xffff,0xffff,0xffff,0xffff,0,0,0,0));

Returns a length of subnet mask.

Trait Implementations

impl Display for PrefixIpAddrV6
[src]

Formats the value using the given formatter.

impl Debug for PrefixIpAddrV6
[src]

Formats the value using the given formatter.