Enum spinel_pack::SpinelDataWlen

source ·
pub enum SpinelDataWlen {}
Expand description

Marker type used to specify data fields that are prepended with its length.

This type is necessary because [u8] is already defined to assume the remaining length of the buffer.

This type has no size and is used only with the TryPackAs/TryUnpackAs traits and in the base type for TryUnpack/TryOwnedUnpack.

Trait Implementations§

source§

impl Debug for SpinelDataWlen

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> TryPackAs<SpinelDataWlen> for &[T]
where Self: TryPackAs<[u8]>,

source§

fn pack_as_len(&self) -> Result<usize>

Calculates how many bytes this type will use when serialized.
source§

fn try_pack_as<B: Write + ?Sized>(&self, buffer: &mut B) -> Result<usize>

Uses Spinel encoding to serialize to a given std::io::Write reference as the Spinel type identified by Marker.
source§

impl<T, const N: usize> TryPackAs<SpinelDataWlen> for [T; N]
where for<'a> &'a [T]: TryPackAs<SpinelDataWlen>,

source§

fn pack_as_len(&self) -> Result<usize>

Calculates how many bytes this type will use when serialized.
source§

fn try_pack_as<B: Write + ?Sized>(&self, buffer: &mut B) -> Result<usize>

Uses Spinel encoding to serialize to a given std::io::Write reference as the Spinel type identified by Marker.
source§

impl TryPackAs<SpinelDataWlen> for ()

source§

fn pack_as_len(&self) -> Result<usize>

Calculates how many bytes this type will use when serialized.
source§

fn try_pack_as<T: Write + ?Sized>(&self, buffer: &mut T) -> Result<usize>

Uses Spinel encoding to serialize to a given std::io::Write reference as the Spinel type identified by Marker.
source§

impl TryPackAs<SpinelDataWlen> for EUI48

source§

fn pack_as_len(&self) -> Result<usize>

Calculates how many bytes this type will use when serialized.
source§

fn try_pack_as<T: Write + ?Sized>(&self, buffer: &mut T) -> Result<usize>

Uses Spinel encoding to serialize to a given std::io::Write reference as the Spinel type identified by Marker.
source§

impl TryPackAs<SpinelDataWlen> for EUI64

source§

fn pack_as_len(&self) -> Result<usize>

Calculates how many bytes this type will use when serialized.
source§

fn try_pack_as<T: Write + ?Sized>(&self, buffer: &mut T) -> Result<usize>

Uses Spinel encoding to serialize to a given std::io::Write reference as the Spinel type identified by Marker.
source§

impl TryPackAs<SpinelDataWlen> for Ipv6Addr

source§

fn pack_as_len(&self) -> Result<usize>

Calculates how many bytes this type will use when serialized.
source§

fn try_pack_as<T: Write + ?Sized>(&self, buffer: &mut T) -> Result<usize>

Uses Spinel encoding to serialize to a given std::io::Write reference as the Spinel type identified by Marker.
source§

impl<T> TryPackAs<SpinelDataWlen> for Vec<T>
where for<'a> &'a [T]: TryPackAs<SpinelDataWlen>,

source§

fn pack_as_len(&self) -> Result<usize>

Calculates how many bytes this type will use when serialized.
source§

fn try_pack_as<B: Write + ?Sized>(&self, buffer: &mut B) -> Result<usize>

Uses Spinel encoding to serialize to a given std::io::Write reference as the Spinel type identified by Marker.
source§

impl TryPackAs<SpinelDataWlen> for bool

source§

fn pack_as_len(&self) -> Result<usize>

Calculates how many bytes this type will use when serialized.
source§

fn try_pack_as<T: Write + ?Sized>(&self, buffer: &mut T) -> Result<usize>

Uses Spinel encoding to serialize to a given std::io::Write reference as the Spinel type identified by Marker.
source§

impl TryPackAs<SpinelDataWlen> for i16

source§

fn pack_as_len(&self) -> Result<usize>

Calculates how many bytes this type will use when serialized.
source§

fn try_pack_as<T: Write + ?Sized>(&self, buffer: &mut T) -> Result<usize>

Uses Spinel encoding to serialize to a given std::io::Write reference as the Spinel type identified by Marker.
source§

impl TryPackAs<SpinelDataWlen> for i32

source§

fn pack_as_len(&self) -> Result<usize>

Calculates how many bytes this type will use when serialized.
source§

fn try_pack_as<T: Write + ?Sized>(&self, buffer: &mut T) -> Result<usize>

Uses Spinel encoding to serialize to a given std::io::Write reference as the Spinel type identified by Marker.
source§

impl TryPackAs<SpinelDataWlen> for i64

source§

fn pack_as_len(&self) -> Result<usize>

Calculates how many bytes this type will use when serialized.
source§

fn try_pack_as<T: Write + ?Sized>(&self, buffer: &mut T) -> Result<usize>

Uses Spinel encoding to serialize to a given std::io::Write reference as the Spinel type identified by Marker.
source§

impl TryPackAs<SpinelDataWlen> for i8

source§

fn pack_as_len(&self) -> Result<usize>

Calculates how many bytes this type will use when serialized.
source§

fn try_pack_as<T: Write + ?Sized>(&self, buffer: &mut T) -> Result<usize>

Uses Spinel encoding to serialize to a given std::io::Write reference as the Spinel type identified by Marker.
source§

impl TryPackAs<SpinelDataWlen> for u16

source§

fn pack_as_len(&self) -> Result<usize>

Calculates how many bytes this type will use when serialized.
source§

fn try_pack_as<T: Write + ?Sized>(&self, buffer: &mut T) -> Result<usize>

Uses Spinel encoding to serialize to a given std::io::Write reference as the Spinel type identified by Marker.
source§

impl TryPackAs<SpinelDataWlen> for u32

source§

fn pack_as_len(&self) -> Result<usize>

Calculates how many bytes this type will use when serialized.
source§

fn try_pack_as<T: Write + ?Sized>(&self, buffer: &mut T) -> Result<usize>

Uses Spinel encoding to serialize to a given std::io::Write reference as the Spinel type identified by Marker.
source§

impl TryPackAs<SpinelDataWlen> for u64

source§

fn pack_as_len(&self) -> Result<usize>

Calculates how many bytes this type will use when serialized.
source§

fn try_pack_as<T: Write + ?Sized>(&self, buffer: &mut T) -> Result<usize>

Uses Spinel encoding to serialize to a given std::io::Write reference as the Spinel type identified by Marker.
source§

impl TryPackAs<SpinelDataWlen> for u8

source§

fn pack_as_len(&self) -> Result<usize>

Calculates how many bytes this type will use when serialized.
source§

fn try_pack_as<T: Write + ?Sized>(&self, buffer: &mut T) -> Result<usize>

Uses Spinel encoding to serialize to a given std::io::Write reference as the Spinel type identified by Marker.
source§

impl<'a> TryUnpackAs<'a, SpinelDataWlen> for &'a [u8]

source§

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>

Convenience method for unpacking directly from a borrowed slice.
source§

impl<'a, T, const N: usize> TryUnpackAs<'a, SpinelDataWlen> for [T; N]
where Self: TryUnpackAs<'a, [u8]>,

source§

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>

Convenience method for unpacking directly from a borrowed slice.
source§

impl<'a> TryUnpackAs<'a, SpinelDataWlen> for ()

source§

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>

Convenience method for unpacking directly from a borrowed slice.
source§

impl<'a> TryUnpackAs<'a, SpinelDataWlen> for EUI48

source§

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>

Convenience method for unpacking directly from a borrowed slice.
source§

impl<'a> TryUnpackAs<'a, SpinelDataWlen> for EUI64

source§

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>

Convenience method for unpacking directly from a borrowed slice.
source§

impl<'a> TryUnpackAs<'a, SpinelDataWlen> for Ipv6Addr

source§

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>

Convenience method for unpacking directly from a borrowed slice.
source§

impl<'a, T> TryUnpackAs<'a, SpinelDataWlen> for Vec<T>
where Self: TryUnpackAs<'a, [u8]>,

source§

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>

Convenience method for unpacking directly from a borrowed slice.
source§

impl<'a> TryUnpackAs<'a, SpinelDataWlen> for bool

source§

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>

Convenience method for unpacking directly from a borrowed slice.
source§

impl<'a> TryUnpackAs<'a, SpinelDataWlen> for i16

source§

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>

Convenience method for unpacking directly from a borrowed slice.
source§

impl<'a> TryUnpackAs<'a, SpinelDataWlen> for i32

source§

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>

Convenience method for unpacking directly from a borrowed slice.
source§

impl<'a> TryUnpackAs<'a, SpinelDataWlen> for i64

source§

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>

Convenience method for unpacking directly from a borrowed slice.
source§

impl<'a> TryUnpackAs<'a, SpinelDataWlen> for i8

source§

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>

Convenience method for unpacking directly from a borrowed slice.
source§

impl<'a> TryUnpackAs<'a, SpinelDataWlen> for u16

source§

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>

Convenience method for unpacking directly from a borrowed slice.
source§

impl<'a> TryUnpackAs<'a, SpinelDataWlen> for u32

source§

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>

Convenience method for unpacking directly from a borrowed slice.
source§

impl<'a> TryUnpackAs<'a, SpinelDataWlen> for u64

source§

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>

Convenience method for unpacking directly from a borrowed slice.
source§

impl<'a> TryUnpackAs<'a, SpinelDataWlen> for u8

source§

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>

Convenience method for unpacking directly from a borrowed slice.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.