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 ref_from_bytes(
source: &[u8],
) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>where
Self: KnownLayout + Immutable,
fn ref_from_bytes(
source: &[u8],
) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>where
Self: KnownLayout + Immutable,
§fn ref_from_prefix(
source: &[u8],
) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>where
Self: KnownLayout + Immutable,
fn ref_from_prefix(
source: &[u8],
) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>where
Self: KnownLayout + Immutable,
§fn ref_from_suffix(
source: &[u8],
) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>where
Self: Immutable + KnownLayout,
fn ref_from_suffix(
source: &[u8],
) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>where
Self: Immutable + KnownLayout,
Interprets the suffix of the given bytes as a
&Self
. Read more§fn mut_from_bytes(
source: &mut [u8],
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
fn mut_from_bytes(
source: &mut [u8],
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
§fn mut_from_prefix(
source: &mut [u8],
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
fn mut_from_prefix(
source: &mut [u8],
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
§fn mut_from_suffix(
source: &mut [u8],
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
fn mut_from_suffix(
source: &mut [u8],
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
source§impl IntoBytes for EUI64
impl IntoBytes for EUI64
§fn as_mut_bytes(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
fn as_mut_bytes(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
Gets the bytes of this value mutably. Read more
§fn write_to(&self, dst: &mut [u8]) -> Result<(), SizeError<&Self, &mut [u8]>>where
Self: Immutable,
fn write_to(&self, dst: &mut [u8]) -> Result<(), SizeError<&Self, &mut [u8]>>where
Self: Immutable,
source§impl KnownLayout for EUI64
impl KnownLayout for EUI64
§type PointerMetadata = <[u8; 8] as KnownLayout>::PointerMetadata
type PointerMetadata = <[u8; 8] as KnownLayout>::PointerMetadata
The type of metadata stored in a pointer to
Self
. Read moresource§impl PartialEq for EUI64
impl PartialEq for EUI64
source§impl SpinelFixedLen for EUI64
impl SpinelFixedLen for EUI64
source§impl TryFromBytes for EUI64
impl TryFromBytes for EUI64
§fn try_ref_from_bytes(
source: &[u8],
) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
fn try_ref_from_bytes(
source: &[u8],
) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
§fn try_ref_from_prefix(
source: &[u8],
) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
fn try_ref_from_prefix(
source: &[u8],
) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
§fn try_ref_from_suffix(
source: &[u8],
) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
fn try_ref_from_suffix(
source: &[u8],
) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
§fn try_mut_from_bytes(
bytes: &mut [u8],
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout,
fn try_mut_from_bytes(
bytes: &mut [u8],
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout,
§fn try_mut_from_prefix(
source: &mut [u8],
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout,
fn try_mut_from_prefix(
source: &mut [u8],
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout,
§fn try_mut_from_suffix(
source: &mut [u8],
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout,
fn try_mut_from_suffix(
source: &mut [u8],
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout,
§fn try_read_from_bytes(
source: &[u8],
) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_bytes(
source: &[u8],
) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
§fn try_read_from_prefix(
source: &[u8],
) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_prefix(
source: &[u8],
) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
§fn try_read_from_suffix(
source: &[u8],
) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_suffix(
source: &[u8],
) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
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 Immutable for EUI64
impl StructuralPartialEq for EUI64
impl Unaligned for EUI64
Auto Trait Implementations§
impl Freeze for EUI64
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)