Struct zerogc_context::CollectorContext[][src]

pub struct CollectorContext<C: RawCollectorImpl> { /* fields omitted */ }

Implementations

Trait Implementations

Executes the destructor for this type. Read more

The system used with this context

The type of ids used in the system

Potentially perform a garbage collection, freeing all objects that aren’t reachable from the specified root. Read more

Inform the garbage collection system we are at a safepoint and are ready for a potential garbage collection. Read more

Unfreeze this context, allowing it to be used again. Read more

Invoke the closure with a temporary GcContext, preserving the specified object as a root of garbage collection. Read more

Potentially perform a garbage collection, freeing all objects that aren’t reachable from the specified root. Read more

Rebrand to the specified root so that it lives for the 'static lifetime. Read more

Rebrand the specified root so that it lives for the lifetime of this context. Read more

Allocate room for a object in, but don’t finish initializing it. Read more

Allocate a slice with the specified length, whose memory is uninitialized Read more

Create a new GcVec with zero initial length, with an implicit reference to this GcContext. Read more

Allocate a new GcVec with the specified capacity and an implcit reference to this GcContext Read more

Allocate the specified object in this garbage collector, binding it to the lifetime of this collector. Read more

Allocate a slice, copied from the specified input

Allocate a slice by filling it with results from the specified closure. Read more

Allocate a slice of the specified length, initializing everything to None Read more

Allocate a slice by repeatedly copying a single value.

It’s not safe for a context to be sent across threads.

We use (thread-unsafe) interior mutability to maintain the shadow stack. Since we could potentially be cloned via safepoint_recurse!, implementing Send would allow another thread to obtain a reference to our internal &RefCell. Further mutation/access would be undefined…..

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.

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.