[][src]Trait copyless::VecHelper

pub trait VecHelper<T> {
    fn alloc(&mut self) -> VecAllocation<'_, T>;
fn entry(&mut self, index: usize) -> VecEntry<'_, T>; }
[]

Helper trait for a Vec type that allocates up-front.

Required methods

fn alloc(&mut self) -> VecAllocation<'_, T>[]

Grows the vector by a single entry, returning the allocation.

fn entry(&mut self, index: usize) -> VecEntry<'_, T>[]

Either returns an existing element, or grows the vector by one. Doesn't expect indices to be higher than the current length.

Implementations on Foreign Types

impl<T> VecHelper<T> for Vec<T>[src][]

Implementors