Struct light_arena::Allocator
[−]
[src]
pub struct Allocator<'a> { /* fields omitted */ }
The allocator provides exclusive access to the memory arena, allowing for allocation of objects in the arena.
Objects allocated by an allocated cannot outlive it, upon destruction
of the allocator the memory space it requested will be made available
again. Drops of allocated objects are not called, only
types which are Sized + Copy
can be safely stored.
Methods
impl<'a> Allocator<'a>
[src]
pub fn alloc_slice<T: Sized + Copy>(&self, len: usize) -> &mut [T]
[src]
Get a dynamically sized slice of data from the allocator. The contents of the slice will be unintialized.
Trait Implementations
impl<'a, 'b, T: 'a + Sized + Copy> Placer<T> for &'a Allocator<'b>
[src]
type Place = AllocatorPlacer<'a, T>
🔬 This is a nightly-only experimental API. (
placement_new_protocol
)Place
is the intermediate agent guarding the uninitialized state for Data
. Read more
fn make_place(self) -> Self::Place
[src]
🔬 This is a nightly-only experimental API. (
placement_new_protocol
)Creates a fresh place from self
.