Crate ghost_gc

Source
Expand description

A garbage collected arena in which garbage collected boxes can be allocated, and which can’t escape from the arena, using invariant lifetimes.

The main type of this crate is the garbage collected pointer Gc. It is a thin smart pointer branded with an invariant lifetime, to ensure that it is unable to escape from the arena in which it was allocated.

The Gc is capable of holding any type which implements the Collect trait, which includes most types which do not contain interior mutability.

This library is more or less a rewrite of gc-arena, with additional nightly features, such as the allocator api, and pointer metadata, to make the garbage collected pointers store the metadata on the heap.

Modules§

locked
Shareable containers which can be made mutable when inside a Gc.

Structs§

Arena
A garbage collected arena, inside which garbage collected pointers can be allocated.
Collector
Gc
A thin, copyable, garbage collected pointer type.
Mutation
UniqueGc
A thin, garbage collected pointer type, which is guaranteed to be unique.
Weak
Write
A marker type which indicates that any owning Gc has been marked as having been modified.

Traits§

Collect
Used to mark each garbage collected pointer that can be reached from the implementing value.
Rootable

Functions§

once_arena