Expand description
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.
Macros§
- custom_
trace - This rule implements the trace method.
- unsafe_
empty_ trace - This rule implements the trace methods with empty implementations.
Structs§
- Borrow
Error - An error returned by
GcCell::try_borrow
. - Borrow
MutError - An error returned by
GcCell::try_borrow_mut
. - Gc
- A garbage-collected pointer type over an immutable value.
- GcCell
- A mutable memory location with dynamically checked borrow rules that can be used inside of a garbage-collected pointer.
- GcCell
Ref - A wrapper type for an immutably borrowed value from a
GcCell<T>
. - GcCell
RefMut - A wrapper type for a mutably borrowed value from a
GcCell<T>
.
Traits§
- Finalize
- The Finalize trait, which needs to be implemented on garbage-collected objects to define finalization logic.
- Trace
- The Trace trait, which needs to be implemented on garbage-collected objects.
Functions§
- finalizer_
safe - force_
collect - Immediately triggers a garbage collection on the current thread.