Struct asyncio::ip::IpAddrV6 [] [src]

pub struct IpAddrV6 { /* fields omitted */ }

Implements IP version 6 style addresses.

Methods

impl IpAddrV6
[src]

Returns a IP-v6 address.

The result will represent the IP address a:b:c:d:e:f:g:h

Examples

use asyncio::ip::IpAddrV6;

let ip = IpAddrV6::new(0,0,0,0,0,0,0,1);

Returns a IP-v6 address with set a scope-id.

The result will represent the IP address a:b:c:d:e:f:g:h%[scope-id]

Examples

use asyncio::ip::IpAddrV6;

let ip = IpAddrV6::with_scope_id(0,0,0,0,0,0,0,1,0x01);

Returns a unspecified IP-v6 address.

Examples

use asyncio::ip::IpAddrV6;

let ip = IpAddrV6::any();
assert_eq!(ip, IpAddrV6::new(0,0,0,0,0,0,0,0));

Returns a loopback IP-v6 address.

Examples

use asyncio::ip::IpAddrV6;

let ip = IpAddrV6::loopback();
assert_eq!(ip, IpAddrV6::new(0,0,0,0,0,0,0,1));

Returns a IP-v6 address from 16-octet bytes.

Examples

use asyncio::ip::IpAddrV6;

let ip = IpAddrV6::from([0,1,2,3, 4,5,6,7, 8,9,10,11, 12,13,14,15], 0);
assert_eq!(ip, IpAddrV6::new(0x0001, 0x0203,0x0405,0x0607,0x0809,0x0A0B, 0x0C0D, 0x0E0F));

Returns a scope-id.

Examples

use asyncio::ip::IpAddrV6;

let ip = IpAddrV6::with_scope_id(0,0,0,0,0,0,0,0, 10);
assert_eq!(ip.get_scope_id(), 10);

Sets a scope-id.

Examples

use asyncio::ip::IpAddrV6;

let mut ip = IpAddrV6::loopback();
assert_eq!(ip.get_scope_id(), 0);

ip.set_scope_id(0x10);
assert_eq!(ip.get_scope_id(), 16);

Returns true if this is a unspecified address.

Returns true if this is a loopback address.

Returns true if this is a link-local address.

Returns true if this is a site-local address.

Returns true if this is a some multicast address.

Returns true if this is a multicast address for global.

Returns true if this is a multicast address for link-local.

Returns true if this is a multicast address for node-local.

Returns true if this is a multicast address for org-local.

Returns true if this is a multicast address for site-local.

Returns true if this is a mapped IP-v4 address.

Returns true if this is a IP-v4 compatible address.

Retruns a 16 octets array.

Retruns a IP-v4 address if this is a convertable address.

Returns a mapped IP-v4 address.

Ex. 192.168.0.1 => ::ffff:192.168.0.1

Returns a IP-v4 compatible address if the addr isn't in 0.0.0.0, 0.0.0.1.

Ex. 192.168.0.1 => ::192.168.0.1

Trait Implementations

impl Default for IpAddrV6
[src]

Returns the "default value" for a type. Read more

impl Clone for IpAddrV6
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for IpAddrV6
[src]

impl PartialEq for IpAddrV6
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Ord for IpAddrV6
[src]

This method returns an Ordering between self and other. Read more

impl PartialOrd for IpAddrV6
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Hash for IpAddrV6
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl AddAssign<i64> for IpAddrV6
[src]

The method for the += operator

impl SubAssign<i64> for IpAddrV6
[src]

The method for the -= operator

impl Display for IpAddrV6
[src]

Formats the value using the given formatter.

impl Debug for IpAddrV6
[src]

Formats the value using the given formatter.

impl From<[u8; 16]> for IpAddrV6
[src]

Performs the conversion.

impl<P: Protocol> IntoEndpoint<P> for IpAddrV6
[src]

impl<'a, P: Protocol> IntoEndpoint<P> for &'a IpAddrV6
[src]

impl FromStr for IpAddrV6
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more