Struct copy_arena::Arena
[−]
[src]
pub struct Arena { /* fields omitted */ }
Holds the backing memory for allocated objects out of itself.
Actual allocation into the Arena
happens via an Allocator
returned
from allocator()
.
Methods
impl Arena
[src]
fn new() -> Arena
Construct a new Arena. This does allocate an block of memory.
fn with_capacity(capacity: usize) -> Arena
Construct a new Arena with the given initial capacity.
The chosen capacity does not limit the final size of the arena.
fn allocator(&mut self) -> Allocator
Construct an Allocator for this arena.
fn capacity(&self) -> usize
Get the number of bytes of memory that have been allocated in service of this arena. Not all of this capacity is necessarily useful, since asked-for memory may not perfectly fit in the underlying blocks allocated.