Trait rcgc::Trace

source ·
pub trait Trace<T: Trace + ?Sized = Self> {
    fn trace(&self, tracer: &mut Tracer<T>);
}
Expand description

Trait for GC-compatible objects that may contain traceable references to other GC-managed objects.

Required Methods§

Trace all contained Handles to other GC objects by calling tracer.trace_handle.

Implementors§

Since GC handles aren’t Copy, they cannot be contained within types that are Copy. Thus any type implementing Copy cannot contain references that need tracing, allowing this no-op blanket impl.