Struct jlrs::memory::frame::GcFrame [−][src]
pub struct GcFrame<'frame, M: Mode> { /* fields omitted */ }
Expand description
A frame that can be used to root values.
Roots are stored in slots, each slot can contain one root. Frames created with slots will preallocate that number of slots. Frames created without slots will dynamically create new slots as needed. A frame’s capacity is at least 16.
Implementations
Returns the number of slots that are currently allocated to this frame.
Try to allocate additional
slots in the current frame. Returns true
on success, or
false
if self.n_slots() + additional > self.capacity()
.
Trait Implementations
Reserve additional
slots in the current frame. Returns true
on success, or false
if
self.n_slots() + additional > self.capacity()
. Read more
Returns the number of slots that are currently allocated to this frame.
Auto Trait Implementations
impl<'frame, M> RefUnwindSafe for GcFrame<'frame, M> where
M: RefUnwindSafe,
impl<'frame, M> !UnwindSafe for GcFrame<'frame, M>
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns true
if the GC is enabled.
Force a collection.
Insert a safepoint, a point where the garbage collector may run.