HeapVec

Type Alias HeapVec 

Source
pub type HeapVec<T, A = Global> = GenericVec<T, Box<[MaybeUninit<T>], A>>;
Available on crate features alloc and nightly only.
Expand description

A heap backed vector with a growable capacity

Aliased Type§

#[repr(C)]
pub struct HeapVec<T, A = Global> { /* private fields */ }

Implementations§

Source§

impl<T> HeapVec<T>

Source

pub fn new() -> Self

Create a new empty HeapVec

Source§

impl<T, A: Allocator> HeapVec<T, A>

Source

pub fn with_alloc(alloc: A) -> Self

Create a new empty HeapVec with the given allocator

Trait Implementations§

Source§

impl<T, A: Allocator> From<Vec<T, A>> for HeapVec<T, A>

Source§

fn from(vec: Vec<T, A>) -> Self

Converts to this type from the input type.