pub struct DecodedArray<const CAP: usize> { /* private fields */ }Expand description
Ordinary bounded decoded bytes.
This ordinary value is Copy and performs no drop-time cleanup. Its name
describes transform direction, not secrecy.
Implementations§
Source§impl<const CAP: usize> DecodedArray<CAP>
impl<const CAP: usize> DecodedArray<CAP>
Sourcepub const fn from_array(
bytes: [u8; CAP],
len: usize,
) -> Result<Self, BufferLengthError>
pub const fn from_array( bytes: [u8; CAP], len: usize, ) -> Result<Self, BufferLengthError>
Constructs ordinary decoded storage with a checked visible prefix.
Sourcepub const fn remaining_capacity(&self) -> usize
pub const fn remaining_capacity(&self) -> usize
Returns the unused backing capacity.
Sourcepub const fn into_parts(self) -> ([u8; CAP], usize)
pub const fn into_parts(self) -> ([u8; CAP], usize)
Consumes the wrapper and returns its backing array and length.
Trait Implementations§
Source§impl<const CAP: usize> Clone for DecodedArray<CAP>
impl<const CAP: usize> Clone for DecodedArray<CAP>
Source§fn clone(&self) -> DecodedArray<CAP>
fn clone(&self) -> DecodedArray<CAP>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<const CAP: usize> Copy for DecodedArray<CAP>
Source§impl<const CAP: usize> Debug for DecodedArray<CAP>
impl<const CAP: usize> Debug for DecodedArray<CAP>
impl<const CAP: usize> Eq for DecodedArray<CAP>
Source§impl<const CAP: usize> Hash for DecodedArray<CAP>
impl<const CAP: usize> Hash for DecodedArray<CAP>
Source§impl<const CAP: usize> PartialEq for DecodedArray<CAP>
impl<const CAP: usize> PartialEq for DecodedArray<CAP>
impl<const CAP: usize> StructuralPartialEq for DecodedArray<CAP>
Auto Trait Implementations§
impl<const CAP: usize> Freeze for DecodedArray<CAP>
impl<const CAP: usize> RefUnwindSafe for DecodedArray<CAP>
impl<const CAP: usize> Send for DecodedArray<CAP>
impl<const CAP: usize> Sync for DecodedArray<CAP>
impl<const CAP: usize> Unpin for DecodedArray<CAP>
impl<const CAP: usize> UnsafeUnpin for DecodedArray<CAP>
impl<const CAP: usize> UnwindSafe for DecodedArray<CAP>
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