Skip to main content

Vec

Type Alias Vec 

Source
pub type Vec<'arena, T, A> = Vec<T, &'arena A>;
Expand description

A contiguous growable array whose elements live in an arena.

The allocator slot is fixed to &'arena A, so construct it with new_in (or with_capacity_in) and pass &arena.

Aliased Type§

pub struct Vec<'arena, T, A> { /* private fields */ }

Trait Implementations§

Source§

impl<'arena, T, A: Arena> FromIteratorIn<T> for Vec<'arena, T, A>

Source§

type Alloc = &'arena A

The allocator handle the collection is built into (e.g. &'arena A).
Source§

fn from_iter_in<I>(iter: I, alloc: Self::Alloc) -> Self
where I: IntoIterator<Item = T>,

Builds Self from iter, allocating into alloc.