Struct cuprate_fixed_bytes::ByteArrayVec
source · pub struct ByteArrayVec<const N: usize>(/* private fields */);Implementations§
source§impl<const N: usize> ByteArrayVec<N>
impl<const N: usize> ByteArrayVec<N>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn take_bytes(self) -> Bytes
sourcepub fn split_off(&mut self, at: usize) -> Self
pub fn split_off(&mut self, at: usize) -> Self
Splits the byte array vec into two at the given index.
Afterwards self contains elements [0, at), and the returned ByteArrayVec contains elements [at, len).
This is an O(1) operation that just increases the reference count and sets a few indices.
§Panics
Panics if at > len.
Trait Implementations§
source§impl<const N: usize> Clone for ByteArrayVec<N>
impl<const N: usize> Clone for ByteArrayVec<N>
source§fn clone(&self) -> ByteArrayVec<N>
fn clone(&self) -> ByteArrayVec<N>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<const N: usize> Debug for ByteArrayVec<N>
impl<const N: usize> Debug for ByteArrayVec<N>
source§impl<const N: usize> From<&ByteArrayVec<N>> for Vec<[u8; N]>
impl<const N: usize> From<&ByteArrayVec<N>> for Vec<[u8; N]>
source§fn from(value: &ByteArrayVec<N>) -> Self
fn from(value: &ByteArrayVec<N>) -> Self
Converts to this type from the input type.
source§impl<const N: usize> PartialEq for ByteArrayVec<N>
impl<const N: usize> PartialEq for ByteArrayVec<N>
source§fn eq(&self, other: &ByteArrayVec<N>) -> bool
fn eq(&self, other: &ByteArrayVec<N>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl<const N: usize> Eq for ByteArrayVec<N>
impl<const N: usize> StructuralPartialEq for ByteArrayVec<N>
Auto Trait Implementations§
impl<const N: usize> !Freeze for ByteArrayVec<N>
impl<const N: usize> RefUnwindSafe for ByteArrayVec<N>
impl<const N: usize> Send for ByteArrayVec<N>
impl<const N: usize> Sync for ByteArrayVec<N>
impl<const N: usize> Unpin for ByteArrayVec<N>
impl<const N: usize> UnwindSafe for ByteArrayVec<N>
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)Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes