Struct arret_runtime::boxed::Heap [−][src]
#[repr(C)]pub struct Heap { /* fields omitted */ }
Heap of garbage collected boxes
Implementations
impl Heap[src]
impl Heap[src]pub fn empty() -> Heap[src]
Returns an empty heap with a default capacity
pub fn new(type_info: TypeInfo, count: usize) -> Heap[src]
Returns a new heap with the given type information and capacity
pub fn should_collect(&self) -> bool[src]
Hints if this heap should be garbage collected
This is a heuristic based on the number of allocations since the last GC cycle.
pub fn alloc_cells(&mut self, count: usize) -> *mut Any[src]
Allocates space for count contiguous cells
pub fn type_info(&self) -> &TypeInfo[src]
Returns the runtime type information associated with the heap
pub fn type_info_mut(&mut self) -> &mut TypeInfo[src]
Returns a mutable reference to the runtime type information associated with the heap
pub fn len(&self) -> usize[src]
Returns the number of allocated cells
pub fn is_empty(&self) -> bool[src]
Returns true if the heap contains no boxes
pub fn place_box<T: Boxed>(&mut self, boxed: T) -> Gc<T>[src]
Places a new boxed value on the heap
Trait Implementations
impl AsInterner for Heap[src]
impl AsInterner for Heap[src]