Skip to main content

ArrayStorage

Trait ArrayStorage 

Source
pub trait ArrayStorage {
    type T;

    // Required methods
    fn insert(&mut self, index: usize, value: Self::T);
    fn remove(&mut self, index: usize) -> Self::T;
    fn clear(&mut self);
}
Expand description

Backing storage for Array256.

Required Associated Types§

Source

type T

The value contained in the storage.

Required Methods§

Source

fn insert(&mut self, index: usize, value: Self::T)

Insert a value into the storage at index.

Source

fn remove(&mut self, index: usize) -> Self::T

Remove the value from the storage at index.

Source

fn clear(&mut self)

Empty the whole storage.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, LenT, S> ArrayStorage for VecInner<T, LenT, S>
where LenT: LenType, S: VecStorage<T>,

Source§

type T = T

Source§

fn insert(&mut self, index: usize, value: Self::T)

Source§

fn remove(&mut self, index: usize) -> Self::T

Source§

fn clear(&mut self)

Source§

impl<T> ArrayStorage for Vec<T>

Source§

type T = T

Source§

fn insert(&mut self, index: usize, value: Self::T)

Source§

fn remove(&mut self, index: usize) -> Self::T

Source§

fn clear(&mut self)

Implementors§