Expand description
Re-exports of relevant items from gc_arena
.
Re-exports§
pub use gc_arena;
Macros§
- Rootable
- A convenience macro for quickly creating a type that implements
Rootable
.
Structs§
- Arena
- A generic, garbage collected arena.
- Gc
- A garbage collected pointer to a type T. Implements Copy, and is implemented as a plain machine
pointer. You can only allocate
Gc
pointers through a&Mutation<'gc>
inside an arena type, and through “generativity” suchGc
pointers may not escape the arena they were born in or be stored inside TLS. This, combined with correctCollect
implementations, means thatGc
pointers will never be dangling and are always safe to access. - GcWeak
- Mutation
- Handle value given by arena callbacks during construction and mutation. Allows allocating new
Gc
pointers and internally mutating values held byGc
pointers. - RefLock
- A wrapper around a
RefCell
that implementsCollect
. - Static
Collect - A wrapper type that implements Collect whenever the contained T is ’static, which is useful in generic contexts
Traits§
- Collect
- A trait for garbage collected objects that can be placed into
Gc
pointers. This trait is unsafe, becauseGc
pointers inside an Arena are assumed never to be dangling, and in order to ensure this certain rules must be followed: - Rootable
- A trait that produces a
Collect
-able type for the given lifetime. This is used to produce the rootCollect
instance in anArena
.
Derive Macros§
- Collect
- Derives the
Collect
trait needed to trace a gc type.