pub struct ByteArrayVec<const N: usize>(/* private fields */);
Implementations§
Source§impl<const N: usize> ByteArrayVec<N>
impl<const N: usize> ByteArrayVec<N>
pub const fn len(&self) -> usize
pub const 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> Default for ByteArrayVec<N>
impl<const N: usize> Default for ByteArrayVec<N>
Source§fn default() -> ByteArrayVec<N>
fn default() -> ByteArrayVec<N>
Returns the “default value” for a type. Read more
Source§impl<'de, const N: usize> Deserialize<'de> for ByteArrayVec<N>
impl<'de, const N: usize> Deserialize<'de> for ByteArrayVec<N>
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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> Hash for ByteArrayVec<N>
impl<const N: usize> Hash for ByteArrayVec<N>
Source§impl<const N: usize> Ord for ByteArrayVec<N>
impl<const N: usize> Ord for ByteArrayVec<N>
Source§fn cmp(&self, other: &ByteArrayVec<N>) -> Ordering
fn cmp(&self, other: &ByteArrayVec<N>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<const N: usize> PartialEq for ByteArrayVec<N>
impl<const N: usize> PartialEq for ByteArrayVec<N>
Source§impl<const N: usize> PartialOrd for ByteArrayVec<N>
impl<const N: usize> PartialOrd for ByteArrayVec<N>
Source§impl<const N: usize> Serialize for ByteArrayVec<N>
impl<const N: usize> Serialize for ByteArrayVec<N>
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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