SliceVec

Type Alias SliceVec 

Source
pub type SliceVec<'a, T> = GenericVec<T, &'a mut [MaybeUninit<T>]>;
Expand description

An slice backed vector backed by potentially uninitialized memory

Aliased Type§

#[repr(C)]
pub struct SliceVec<'a, T> { /* private fields */ }

Implementations§

Source§

impl<'a, T> SliceVec<'a, T>

Source

pub unsafe fn new(slice: &'a mut [MaybeUninit<T>]) -> Self

Create a new empty SliceVec.

§Safety

The contents of the slice should be completely uninitialised

Source

pub fn full(slice: &'a mut [T]) -> Self

Create a new full SliceVec