#[repr(transparent)]pub struct ByteArray<const N: usize>(_);
Expand description
Newtype for [u8; N]
.
Used to implement Encode
and Decode
which translate to
CBOR bytes instead of arrays for u8
s.
Trait Implementations
sourceimpl<const N: usize> BorrowMut<ByteSlice> for ByteArray<N>
impl<const N: usize> BorrowMut<ByteSlice> for ByteArray<N>
sourcefn borrow_mut(&mut self) -> &mut ByteSlice
fn borrow_mut(&mut self) -> &mut ByteSlice
Mutably borrows from an owned value. Read more
sourceimpl<'b, const N: usize> DecodeBytes<'b> for ByteArray<N>
impl<'b, const N: usize> DecodeBytes<'b> for ByteArray<N>
sourceimpl<const N: usize> EncodeBytes for ByteArray<N>
impl<const N: usize> EncodeBytes for ByteArray<N>
sourceimpl<const N: usize> Ord for ByteArray<N>
impl<const N: usize> Ord for ByteArray<N>
sourceimpl<const N: usize> PartialOrd<ByteArray<N>> for ByteArray<N>
impl<const N: usize> PartialOrd<ByteArray<N>> for ByteArray<N>
sourcefn partial_cmp(&self, other: &ByteArray<N>) -> Option<Ordering>
fn partial_cmp(&self, other: &ByteArray<N>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<const N: usize> Copy for ByteArray<N>
impl<const N: usize> Eq for ByteArray<N>
impl<const N: usize> StructuralEq for ByteArray<N>
impl<const N: usize> StructuralPartialEq for ByteArray<N>
Auto Trait Implementations
impl<const N: usize> RefUnwindSafe for ByteArray<N>
impl<const N: usize> Send for ByteArray<N>
impl<const N: usize> Sync for ByteArray<N>
impl<const N: usize> Unpin for ByteArray<N>
impl<const N: usize> UnwindSafe for ByteArray<N>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more