[][src]Struct smoltcp::wire::Ipv6Address

pub struct Ipv6Address(pub [u8; 16]);

A sixteen-octet IPv6 address.

Methods

impl Address[src]

pub const UNSPECIFIED: Address[src]

pub const LOOPBACK: Address[src]

pub fn new(
    a0: u16,
    a1: u16,
    a2: u16,
    a3: u16,
    a4: u16,
    a5: u16,
    a6: u16,
    a7: u16
) -> Address
[src]

Construct an IPv6 address from parts.

pub fn from_bytes(data: &[u8]) -> Address[src]

Construct an IPv6 address from a sequence of octets, in big-endian.

Panics

The function panics if data is not sixteen octets long.

pub fn from_parts(data: &[u16]) -> Address[src]

Construct an IPv6 address from a sequence of words, in big-endian.

Panics

The function panics if data is not 8 words long.

pub fn write_parts(&self, data: &mut [u16])[src]

Write a IPv6 address to the given slice.

Panics

The function panics if data is not 8 words long.

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

Return an IPv6 address as a sequence of octets, in big-endian.

pub fn is_unicast(&self) -> bool[src]

Query whether the IPv6 address is an unicast address.

pub fn is_multicast(&self) -> bool[src]

Query whether the IPv6 address is a multicast address.

pub fn is_unspecified(&self) -> bool[src]

Query whether the IPv6 address is the unspecified address.

Query whether the IPv6 address is in the link-local scope.

pub fn is_loopback(&self) -> bool[src]

Query whether the IPv6 address is the loopback address.

pub fn is_ipv4_mapped(&self) -> bool[src]

Query whether the IPv6 address is an IPv4 mapped IPv6 address.

pub fn as_ipv4(&self) -> Option<Address>[src]

Convert an IPv4 mapped IPv6 address to an IPv4 address.

pub fn solicited_node(&self) -> Address[src]

The solicited node for the given unicast address.

Panics

This function panics if the given address is not unicast.

Trait Implementations

impl Clone for Address[src]

impl Copy for Address[src]

impl Debug for Address[src]

impl Default for Address[src]

impl Display for Address[src]

impl Eq for Address[src]

impl From<Address> for Address[src]

impl From<Address> for Ipv6Addr[src]

impl From<Address> for Address[src]

Convert the given IPv4 address into a IPv4-mapped IPv6 address

impl From<Ipv6Addr> for Address[src]

impl FromStr for Ipv6Address[src]

type Err = ()

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<Ipv6Address, ()>[src]

Parse a string representation of an IPv6 address.

impl Hash for Address[src]

impl Ord for Address[src]

impl PartialEq<Address> for Address[src]

impl PartialOrd<Address> for Address[src]

impl StructuralEq for Address[src]

impl StructuralPartialEq for Address[src]

Auto Trait Implementations

impl RefUnwindSafe for Address

impl Send for Address

impl Sync for Address

impl Unpin for Address

impl UnwindSafe for Address

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.