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 FromBytes for EUI64
impl FromBytes for EUI64
§fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized + NoCell,
fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized + NoCell,
Interprets the prefix of the given
bytes
as a &[Self]
with length
equal to count
without copying. Read more§fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized + NoCell,
fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized + NoCell,
Interprets the suffix of the given
bytes
as a &[Self]
with length
equal to count
without copying. Read more§fn mut_slice_from_prefix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [Self], &mut [u8])>where
Self: Sized + IntoBytes + NoCell,
fn mut_slice_from_prefix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [Self], &mut [u8])>where
Self: Sized + IntoBytes + NoCell,
Interprets the prefix of the given
bytes
as a &mut [Self]
with length
equal to count
without copying. Read more§fn mut_slice_from_suffix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [u8], &mut [Self])>where
Self: Sized + IntoBytes + NoCell,
fn mut_slice_from_suffix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [u8], &mut [Self])>where
Self: Sized + IntoBytes + NoCell,
Interprets the suffix of the given
bytes
as a &mut [Self]
with length
equal to count
without copying. Read more§fn read_from_prefix(bytes: &[u8]) -> Option<Self>where
Self: Sized,
fn read_from_prefix(bytes: &[u8]) -> Option<Self>where
Self: Sized,
source§impl IntoBytes for EUI64
impl IntoBytes for EUI64
source§impl PartialEq for EUI64
impl PartialEq 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.
impl Copy for EUI64
impl Eq for EUI64
impl StructuralPartialEq for EUI64
impl Unaligned for EUI64
Auto Trait Implementations§
impl RefUnwindSafe for EUI64
impl Send for EUI64
impl Sync for EUI64
impl Unpin for EUI64
impl UnwindSafe for EUI64
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
Mutably borrows from an owned value. Read more