Modules
- Write barrier management.
- GC-aware interior mutability types.
Macros
- A convenience macro for quickly creating type that implements
Rootable. - If a type is static, we know that it can never hold
Gcpointers, so it is safe to provide a simple emptyCollectimplementation.Collectimplementation. - If a type will never hold
Gcpointers, you can use this macro to provide a simple emptyCollectimplementation.
Structs
- A generic, garbage collected arena.
- Tuning parameters for a given garbage collected
Arena. - Handle value given by arena callbacks during garbage collection, which must be passed through
Collect::traceimplementations. - A garbage collected pointer to a type T. Implements Copy, and is implemented as a plain machine pointer. You can only allocate
Gcpointers through a&Mutation<'gc>inside an arena type, and through “generativity” suchGcpointers may not escape the arena they were born in or be stored inside TLS. This, combined with correctCollectimplementations, means thatGcpointers will never be dangling and are always safe to access. - Handle value given by arena callbacks during construction and mutation. Allows allocating new
Gcpointers and internally mutating values held byGcpointers. - A wrapper type that implements Collect whenever the contained T is ’static, which is useful in generic contexts
Traits
- A trait for garbage collected objects that can be placed into
Gcpointers. This trait is unsafe, becauseGcpointers inside an Arena are assumed never to be dangling, and in order to ensure this certain rules must be followed:
Functions
- Create a temporary arena without a root object and perform the given operation on it. No garbage collection will be done until the very end of the call, at which point all allocations will be collected.
Type Definitions
- A helper type alias for a
Rootable::Rootfor a specific lifetime.