Struct everscale_types::util::ArrayVec
source · pub struct ArrayVec<T, const N: usize> { /* private fields */ }Expand description
Small on-stack vector of max length N.
Implementations§
source§impl<T, const N: usize> ArrayVec<T, N>
impl<T, const N: usize> ArrayVec<T, N>
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the number of elements in the vector, also referred to as its ‘length’.
sourcepub unsafe fn push(&mut self, item: T)
pub unsafe fn push(&mut self, item: T)
Appends an element to the back of a collection.
Safety
The following must be true:
- The length of this vector is less than
N.
sourcepub unsafe fn into_inner(self) -> [MaybeUninit<T>; N]
pub unsafe fn into_inner(self) -> [MaybeUninit<T>; N]
Returns the inner data without dropping its elements.
Safety
The caller is responsible for calling the destructor for
len initialized items in the returned array.
Trait Implementations§
Auto Trait Implementations§
impl<T, const N: usize> RefUnwindSafe for ArrayVec<T, N>where T: RefUnwindSafe,
impl<T, const N: usize> Send for ArrayVec<T, N>where T: Send,
impl<T, const N: usize> Sync for ArrayVec<T, N>where T: Sync,
impl<T, const N: usize> Unpin for ArrayVec<T, N>where T: Unpin,
impl<T, const N: usize> UnwindSafe for ArrayVec<T, N>where T: UnwindSafe,
Blanket Implementations§
source§impl<T> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere T: AsRef<[u8]>,
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)