Module rc

Source
Expand description

A non-sync cycle-collecting reference-counted smart pointer.

Modules§

trace
Contains the Trace trait which must be implemented for items stored in a Gc.

Structs§

Gc
A cycle-collected reference-counted smart pointer.
GcVisitor
Visitor provided during tracing of the reachable object graph. You shouldn’t need to interact with this as Gc::visit_children will do the right thing for you.
Ref
Wraps an immutable borrowed reference to a value in a Gc.
RefMut
Wraps a mutable borrowed reference to a value in a Gc.

Traits§

Trace
Must be implemented for any value which will be stored inside of a Gc.

Functions§

collect
Perform a normal collection cycle.
collect_full
Perform a full, cycle-tracing collection of both the old & young gen.
collect_with_options
Perform a collection cycle based on CollectOptions.