Struct spinel_pack::EUI64
source · #[repr(C)]pub struct EUI64(pub [u8; 8]);
Expand description
Data type representing a EUI64 address.
Tuple Fields§
§0: [u8; 8]
Trait Implementations§
source§impl AsBytes for EUI64where
[u8; 8]: AsBytes,
HasPadding<EUI64, { _ }>: ShouldBe<{ _ }>,
impl AsBytes for EUI64where [u8; 8]: AsBytes, HasPadding<EUI64, { _ }>: ShouldBe<{ _ }>,
§fn as_bytes_mut(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
fn as_bytes_mut(&mut self) -> &mut [u8] ⓘwhere Self: FromBytes,
Gets the bytes of this value mutably. Read more
§fn write_to_prefix<B>(&self, bytes: B) -> Option<()>where
B: ByteSliceMut,
fn write_to_prefix<B>(&self, bytes: B) -> Option<()>where B: ByteSliceMut,
§fn write_to_suffix<B>(&self, bytes: B) -> Option<()>where
B: ByteSliceMut,
fn write_to_suffix<B>(&self, bytes: B) -> Option<()>where B: ByteSliceMut,
source§impl FromBytes for EUI64where
[u8; 8]: FromBytes,
impl FromBytes for EUI64where [u8; 8]: FromBytes,
§fn read_from_prefix<B>(bytes: B) -> Option<Self>where
B: ByteSlice,
Self: Sized,
fn read_from_prefix<B>(bytes: B) -> Option<Self>where B: ByteSlice, Self: Sized,
§fn read_from_suffix<B>(bytes: B) -> Option<Self>where
B: ByteSlice,
Self: Sized,
fn read_from_suffix<B>(bytes: B) -> Option<Self>where B: ByteSlice, Self: Sized,
§fn new_zeroed() -> Selfwhere
Self: Sized,
fn new_zeroed() -> Selfwhere Self: Sized,
Creates an instance of
Self
from zeroed bytes.source§impl PartialEq<EUI64> for EUI64
impl PartialEq<EUI64> for EUI64
source§impl SpinelFixedLen for EUI64
impl SpinelFixedLen for EUI64
source§impl<'a> TryInto<&'a EUI64> for &'a [u8]
impl<'a> TryInto<&'a EUI64> for &'a [u8]
Converts a borrowed byte slice into a borrowed EUI64 reference. Will panic if the length of the slice is not exactly 8 bytes.
source§impl TryOwnedUnpack for EUI64
impl TryOwnedUnpack for EUI64
§type Unpacked = EUI64
type Unpacked = EUI64
The type of the unpacked result. This can be the same as
Self
,
but in some cases it can be different. This is because Self
is
a marker type, and may not even be Sized
. For example, if Self
is
SpinelUint
, then Unpacked
would be u32
(because SpinelUint
is just
a marker trait indicating a variably-sized unsigned integer).source§fn try_owned_unpack(iter: &mut Iter<'_, u8>) -> Result<Self::Unpacked>
fn try_owned_unpack(iter: &mut Iter<'_, u8>) -> Result<Self::Unpacked>
Attempts to decode the data at the given iterator into an instance
of
Self
, where Self
must be an “owned” type.source§impl TryPack for EUI64
impl TryPack for EUI64
source§fn pack_len(&self) -> Result<usize>
fn pack_len(&self) -> Result<usize>
Calculates how many bytes this type will use when serialized.
source§fn try_pack<T: Write + ?Sized>(&self, buffer: &mut T) -> Result<usize>
fn try_pack<T: Write + ?Sized>(&self, buffer: &mut T) -> Result<usize>
Uses Spinel encoding to serialize to a given
std::io::Write
reference.source§fn try_array_pack<T: Write + ?Sized>(&self, buffer: &mut T) -> Result<usize>
fn try_array_pack<T: Write + ?Sized>(&self, buffer: &mut T) -> Result<usize>
Uses Spinel array encoding to serialize to a given
std::io::Write
reference. Read moresource§impl TryPackAs<SpinelDataWlen> for EUI64
impl TryPackAs<SpinelDataWlen> for EUI64
source§impl<'a> TryUnpack<'a> for &'a EUI64
impl<'a> TryUnpack<'a> for &'a EUI64
Borrowed unpack for EUI64
§type Unpacked = &'a EUI64
type Unpacked = &'a EUI64
The type of the unpacked result. This can be the same as
Self
,
but in some cases it can be different. This is because Self
is
a marker type, and may not even be Sized
. For example, if Self
is
SpinelUint
, then Unpacked
would be u32
(because SpinelUint
is just
a marker trait indicating a variably-sized unsigned integer).source§fn try_unpack(iter: &mut Iter<'a, u8>) -> Result<Self::Unpacked>
fn try_unpack(iter: &mut Iter<'a, u8>) -> Result<Self::Unpacked>
Attempts to decode the data at the given iterator into an instance
of
Self
.source§impl<'a> TryUnpack<'a> for EUI64
impl<'a> TryUnpack<'a> for EUI64
§type Unpacked = <EUI64 as TryOwnedUnpack>::Unpacked
type Unpacked = <EUI64 as TryOwnedUnpack>::Unpacked
The type of the unpacked result. This can be the same as
Self
,
but in some cases it can be different. This is because Self
is
a marker type, and may not even be Sized
. For example, if Self
is
SpinelUint
, then Unpacked
would be u32
(because SpinelUint
is just
a marker trait indicating a variably-sized unsigned integer).source§fn try_unpack(iter: &mut Iter<'a, u8>) -> Result<Self::Unpacked>
fn try_unpack(iter: &mut Iter<'a, u8>) -> Result<Self::Unpacked>
Attempts to decode the data at the given iterator into an instance
of
Self
.source§impl<'a> TryUnpackAs<'a, [u8]> for EUI64
impl<'a> TryUnpackAs<'a, [u8]> for EUI64
source§fn try_unpack_as(iter: &mut Iter<'a, u8>) -> Result<Self>
fn try_unpack_as(iter: &mut Iter<'a, u8>) -> Result<Self>
Attempts to decode the data (with a format determined by
Marker
) at the given
iterator into an instance of Self
.source§fn try_unpack_as_from_slice(slice: &'a [u8]) -> Result<Self>
fn try_unpack_as_from_slice(slice: &'a [u8]) -> Result<Self>
Convenience method for unpacking directly from a borrowed slice.
source§impl<'a> TryUnpackAs<'a, EUI64> for EUI64
impl<'a> TryUnpackAs<'a, EUI64> for EUI64
source§fn try_unpack_as(iter: &mut Iter<'a, u8>) -> Result<Self>
fn try_unpack_as(iter: &mut Iter<'a, u8>) -> Result<Self>
Attempts to decode the data (with a format determined by
Marker
) at the given
iterator into an instance of Self
.source§fn try_unpack_as_from_slice(slice: &'a [u8]) -> Result<Self>
fn try_unpack_as_from_slice(slice: &'a [u8]) -> Result<Self>
Convenience method for unpacking directly from a borrowed slice.
source§impl<'a> TryUnpackAs<'a, SpinelDataWlen> for EUI64
impl<'a> TryUnpackAs<'a, SpinelDataWlen> for EUI64
source§fn try_unpack_as(iter: &mut Iter<'a, u8>) -> Result<Self>
fn try_unpack_as(iter: &mut Iter<'a, u8>) -> Result<Self>
Attempts to decode the data (with a format determined by
Marker
) at the given
iterator into an instance of Self
.source§fn try_unpack_as_from_slice(slice: &'a [u8]) -> Result<Self>
fn try_unpack_as_from_slice(slice: &'a [u8]) -> Result<Self>
Convenience method for unpacking directly from a borrowed slice.