Struct embassy_net::Ipv6Address
pub struct Ipv6Address(pub [u8; 16]);
Expand description
A sixteen-octet IPv6 address.
Tuple Fields§
§0: [u8; 16]
Implementations§
§impl Address
impl Address
pub const UNSPECIFIED: Address = _
pub const UNSPECIFIED: Address = _
The unspecified address.
pub const LINK_LOCAL_ALL_NODES: Address = _
pub const LINK_LOCAL_ALL_NODES: Address = _
The link-local all nodes multicast address.
pub const LINK_LOCAL_ALL_ROUTERS: Address = _
pub const LINK_LOCAL_ALL_ROUTERS: Address = _
The link-local all routers multicast address.
pub const LINK_LOCAL_ALL_MLDV2_ROUTERS: Address = _
pub const LINK_LOCAL_ALL_MLDV2_ROUTERS: Address = _
The link-local all MLVDv2-capable routers multicast address.
pub const LINK_LOCAL_ALL_RPL_NODES: Address = _
pub const LINK_LOCAL_ALL_RPL_NODES: Address = _
The link-local all RPL nodes multicast address.
pub const LOOPBACK: Address = _
pub const LOOPBACK: Address = _
The loopback address.
pub const IPV4_MAPPED_PREFIX: [u8; 12] = _
pub const IPV4_MAPPED_PREFIX: [u8; 12] = _
The prefix used in IPv4-mapped addresses.
pub const fn new(
a0: u16,
a1: u16,
a2: u16,
a3: u16,
a4: u16,
a5: u16,
a6: u16,
a7: u16,
) -> Address
pub const fn new( a0: u16, a1: u16, a2: u16, a3: u16, a4: u16, a5: u16, a6: u16, a7: u16, ) -> Address
Construct an IPv6 address from parts.
pub fn from_bytes(data: &[u8]) -> Address
pub fn from_bytes(data: &[u8]) -> Address
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
pub fn from_parts(data: &[u16]) -> Address
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])
pub fn write_parts(&self, data: &mut [u16])
pub fn is_unicast(&self) -> bool
pub fn is_unicast(&self) -> bool
Query whether the IPv6 address is an unicast address.
pub const fn is_global_unicast(&self) -> bool
pub const fn is_global_unicast(&self) -> bool
Query whether the IPv6 address is a global unicast address.
pub const fn is_multicast(&self) -> bool
pub const fn is_multicast(&self) -> bool
Query whether the IPv6 address is a multicast address.
pub fn is_unspecified(&self) -> bool
pub fn is_unspecified(&self) -> bool
Query whether the IPv6 address is the unspecified address.
pub fn is_link_local(&self) -> bool
pub fn is_link_local(&self) -> bool
Query whether the IPv6 address is in the link-local scope.
pub fn is_unique_local(&self) -> bool
pub fn is_unique_local(&self) -> bool
Query whether the IPv6 address is a Unique Local Address (ULA).
pub fn is_loopback(&self) -> bool
pub fn is_loopback(&self) -> bool
Query whether the IPv6 address is the loopback address.
pub fn is_ipv4_mapped(&self) -> bool
pub fn is_ipv4_mapped(&self) -> bool
Query whether the IPv6 address is an IPv4 mapped IPv6 address.
pub fn solicited_node(&self) -> Address
pub fn solicited_node(&self) -> Address
The solicited node for the given unicast address.
§Panics
This function panics if the given address is not unicast.
pub const fn into_address(self) -> Address
pub const fn into_address(self) -> Address
Convert to an IpAddress
.
Same as .into()
, but works in const
.
Trait Implementations§
§impl Ord for Address
impl Ord for Address
§impl PartialOrd for Address
impl PartialOrd for Address
impl Copy for Address
impl Eq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)