Trait zerogc::ImplicitWriteBarrier
source · [−]pub unsafe trait ImplicitWriteBarrier { }
Expand description
Indicates that a mutable reference to a type is safe to use without triggering a write barrier.
This means one of either two things:
- This type doesn’t need any write barriers
- Mutating this type implicitly triggers a write barrier.
This is the bound for RefCell<T>
. Since a RefCell doesn’t explicitly trigger write barriers,
a RefCell
can only be used with T
if either:
T
doesn’t need any write barriers orT
implicitly triggers write barriers on any mutation