Struct spinel_pack::EUI48
source · #[repr(C)]pub struct EUI48(pub [u8; 6]);
Expand description
Data type representing a EUI48 address.
Tuple Fields§
§0: [u8; 6]
Trait Implementations§
source§impl AsBytes for EUI48where
[u8; 6]: AsBytes,
HasPadding<EUI48, { _ }>: ShouldBe<{ _ }>,
impl AsBytes for EUI48where [u8; 6]: AsBytes, HasPadding<EUI48, { _ }>: 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(&self, bytes: &mut [u8]) -> Option<()>
fn write_to_prefix(&self, bytes: &mut [u8]) -> Option<()>
source§impl FromBytes for EUI48where
[u8; 6]: FromBytes,
impl FromBytes for EUI48where [u8; 6]: FromBytes,
source§impl PartialEq<EUI48> for EUI48
impl PartialEq<EUI48> for EUI48
source§impl SpinelFixedLen for EUI48
impl SpinelFixedLen for EUI48
source§impl<'a> TryInto<&'a EUI48> for &'a [u8]
impl<'a> TryInto<&'a EUI48> for &'a [u8]
Converts a borrowed byte slice into a borrowed EUI48 reference. Will panic if the length of the slice is not exactly 6 bytes.
source§impl TryOwnedUnpack for EUI48
impl TryOwnedUnpack for EUI48
§type Unpacked = EUI48
type Unpacked = EUI48
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 EUI48
impl TryPack for EUI48
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 EUI48
impl TryPackAs<SpinelDataWlen> for EUI48
source§impl<'a> TryUnpack<'a> for &'a EUI48
impl<'a> TryUnpack<'a> for &'a EUI48
Borrowed unpack for EUI48
§type Unpacked = &'a EUI48
type Unpacked = &'a EUI48
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 EUI48
impl<'a> TryUnpack<'a> for EUI48
§type Unpacked = <EUI48 as TryOwnedUnpack>::Unpacked
type Unpacked = <EUI48 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 EUI48
impl<'a> TryUnpackAs<'a, [u8]> for EUI48
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, EUI48> for EUI48
impl<'a> TryUnpackAs<'a, EUI48> for EUI48
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 EUI48
impl<'a> TryUnpackAs<'a, SpinelDataWlen> for EUI48
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 EUI48
impl Eq for EUI48
impl StructuralEq for EUI48
impl StructuralPartialEq for EUI48
impl Unaligned for EUI48where [u8; 6]: Unaligned,
Auto Trait Implementations§
impl RefUnwindSafe for EUI48
impl Send for EUI48
impl Sync for EUI48
impl Unpin for EUI48
impl UnwindSafe for EUI48
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