pub struct GcCell<T> { /* private fields */ }Expand description
GcCell is a zero-overhead memory cell that provides interior mutability
for garbage collected types.
Mutable access to the value inside the GcCell is granted by delivering
proof that the caller has mutable access to the V8 Isolate (such as through
a HandleScope). This statically guarantees that
access patterns follow the rules of both the garbage collector and the Rust
borrow checker.
GcCell also implements Traced, which means that it can hold other
garbage collected references, like Member or WeakMember. If the
GcCell holds other garbage collected objects, those objects cannot be
accessed while the GcCell is borrowed, and the caller must construct
temporary pointers (UnsafePtr<T>) on the stack in order to access nested
objects in the object graph.