Type Alias ArrayvecStorage

Source
pub type ArrayvecStorage<T, N> = ArrayvecStorageRaw<T, N, IndexForCapacity<N>>;
Expand description

A wrapper around a GenericArray that implements the Array trait from the arrayvec crate, allowing it to be used as the backing store for ArrayVec and ArrayString.

You likely won’t need to interact with this type directly, except in where clauses when working with GenericArrayVec and GenericArrayString; see their docs for details.

Aliased Type§

#[repr(transparent)]
pub struct ArrayvecStorage<T, N>(pub GenericArray<T, N>, _);

Tuple Fields§

§0: GenericArray<T, N>

Implementations

Source§

impl<T, N, I> ArrayvecStorageRaw<T, N, I>
where N: ArrayLength<T>,

Source

pub fn new(arr: GenericArray<T, N>) -> Self

Wraps the given GenericArray into a new Wrapper.

Source

pub fn into_inner(self) -> GenericArray<T, N>

Returns the inner GenericArray inside this Wrapper

Trait Implementations

Source§

impl<T, N> Array for ArrayvecStorageRaw<T, N, u16>
where N: ArrayLength<T> + IsLess<U65536>, <N as IsLess<U65536>>::Output: IsTrue,

Source§

const CAPACITY: usize = N::USIZE

The array’s element capacity
Source§

type Item = T

The array’s element type
Source§

fn as_slice(&self) -> &[Self::Item]

Source§

fn as_mut_slice(&mut self) -> &mut [Self::Item]

Source§

impl<T, N> Array for ArrayvecStorageRaw<T, N, u32>

Source§

const CAPACITY: usize = N::USIZE

The array’s element capacity
Source§

type Item = T

The array’s element type
Source§

fn as_slice(&self) -> &[Self::Item]

Source§

fn as_mut_slice(&mut self) -> &mut [Self::Item]

Source§

impl<T, N> Array for ArrayvecStorageRaw<T, N, u8>
where N: ArrayLength<T> + IsLess<U256>, <N as IsLess<U256>>::Output: IsTrue,

Source§

const CAPACITY: usize = N::USIZE

The array’s element capacity
Source§

type Item = T

The array’s element type
Source§

fn as_slice(&self) -> &[Self::Item]

Source§

fn as_mut_slice(&mut self) -> &mut [Self::Item]

Source§

impl<T, N> Array for ArrayvecStorageRaw<T, N, usize>
where N: ArrayLength<T>,

Source§

const CAPACITY: usize = N::USIZE

The array’s element capacity
Source§

type Item = T

The array’s element type
Source§

fn as_slice(&self) -> &[Self::Item]

Source§

fn as_mut_slice(&mut self) -> &mut [Self::Item]

Source§

impl<T> Array for ArrayvecStorageRaw<T, U1, bool>

Source§

const CAPACITY: usize = 1usize

The array’s element capacity
Source§

type Item = T

The array’s element type
Source§

fn as_slice(&self) -> &[Self::Item]

Source§

fn as_mut_slice(&mut self) -> &mut [Self::Item]

Source§

impl<T> Array for ArrayvecStorageRaw<T, U0, ()>

Source§

const CAPACITY: usize = 0usize

The array’s element capacity
Source§

type Item = T

The array’s element type
Source§

fn as_slice(&self) -> &[Self::Item]

Source§

fn as_mut_slice(&mut self) -> &mut [Self::Item]

Source§

impl<T: Clone, N, I: Clone> Clone for ArrayvecStorageRaw<T, N, I>
where N: ArrayLength<T> + Clone,

Source§

fn clone(&self) -> ArrayvecStorageRaw<T, N, I>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug, N, I: Debug> Debug for ArrayvecStorageRaw<T, N, I>
where N: ArrayLength<T> + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T, N, I> From<GenericArray<T, N>> for ArrayvecStorageRaw<T, N, I>
where N: ArrayLength<T>,

Source§

fn from(arr: GenericArray<T, N>) -> Self

Converts to this type from the input type.
Source§

impl<T, N, I> Copy for ArrayvecStorageRaw<T, N, I>
where T: Copy, N: ArrayLength<T>, N::ArrayType: Copy, I: Copy,