Struct copy_arena::Allocator
[−]
[src]
pub struct Allocator<'a> { /* fields omitted */ }
Allows allocation out of arena.
Methods
impl<'a> Allocator<'a>
[src]
fn alloc<T: Copy>(&mut self, elem: T) -> &'a mut T
Allocate a copy of an object
fn alloc_default<T: Copy + Default>(&mut self) -> &'a mut T
Allocate a default-valued object
fn alloc_slice<T: Copy>(&mut self, elems: &[T]) -> &'a mut [T]
Allocate a copy of a slice
fn alloc_slice_fn<T: Copy, F>(&mut self, len: usize, f: F) -> &'a mut [T] where
F: FnMut(usize) -> T,
F: FnMut(usize) -> T,
Allocate and populate a slice, creating each element as a function of its index.
fn alloc_slice_default<T: Copy + Default>(&mut self, len: usize) -> &'a mut [T]
Allocate a slice populated by default-valued elements.