pub unsafe trait CustomTraceable {
// Required method
unsafe fn trace(&self, trc: *mut JSTracer);
}
Expand description
A trait to allow tracing only DOM sub-objects.
§Safety
This trait is unsafe; if it is implemented incorrectly, the GC may end up collecting objects that are still reachable.
Required Methods§
sourceunsafe fn trace(&self, trc: *mut JSTracer)
unsafe fn trace(&self, trc: *mut JSTracer)
Trace self
.
§Safety
The JSTracer
argument must point to a valid JSTracer
in memory. In addition,
implementors of this method must ensure that all active objects are properly traced
or else the garbage collector may end up collecting objects that are still reachable.