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 values currently rooted in this frame.

Returns the number of slots that are currently allocated to this frame.

Returns the maximum number of slots this frame can use.

Try to allocate additional slots in the current frame. Returns true on success, or false if self.n_slots() + additional > self.capacity().

Trait Implementations

Executes the destructor for this type. Read more

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 values currently rooted in this frame.

Returns the number of slots that are currently allocated to this frame.

Returns the maximum number of slots this frame can use.

This method takes a mutable reference to a frame and returns it; this method can be used as an alternative to reborrowing a frame with &mut *frame when a Scope is needed. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Enable or disable the GC.

Returns true if the GC is enabled.

Force a collection.

Insert a safepoint, a point where the garbage collector may run.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.