Trait TracePtr

Source
pub(crate) trait TracePtr {
    // Required method
    fn trace_ptr(&self, state: &mut GcState);
}
Expand description

A trait for types that are pointers to GC objects. This is a separate trait from Trace because pointers will need to be updated during garbage collection (with the GcMoveable trait). Derive Trace will not handle use GcMoveable to move the object to the new space, so the pointer will not get updated. This trait is used by the Slot type to update pointers during garbage collection.

Required Methods§

Source

fn trace_ptr(&self, state: &mut GcState)

Implementations on Foreign Types§

Source§

impl<T: Trace> TracePtr for &T

Source§

fn trace_ptr(&self, state: &mut GcState)

Implementors§

Source§

impl TracePtr for Symbol<'_>

Source§

impl<T> TracePtr for Gc<T>