Crate gc [] [src]

Thread-local garbage-collected boxes (The Gc<T> type).

The Gc<T> type provides shared ownership of an immutable value. It is marked as non-sendable because the garbage collection only occurs thread locally.

Reexports

pub use trace::Trace;

Modules

trace

Macros

custom_trace!

This rule implements the trace method. You define a this parameter name, and pass in a body, the body should call mark on every traceable element inside the body, and the mark implementation will automatically delegate to the correct method on the argument.

unsafe_empty_trace!

This simple rule implements the trace methods such with empty implementations - use this for marking types as not containing any Trace types!

Structs

Gc

A garbage-collected pointer type over an immutable value.

GcCell

A mutable memory location with dynamically checked borrow rules which can be used inside of a garbage collected pointer.

GcCellRefMut

A wrapper type for a mutably borrowed value from a GcCell

Functions

force_collect

Immediately trigger a garbage collection on the current thread.

Type Definitions

GcCellRef

A wrapper type for an immutably borrowed value from a GcCell