pub unsafe trait Trace {
unsafe fn root(&mut self) { ... }
unsafe fn unroot(&mut self) { ... }
fn trace(&self, gc: &mut Gc) { ... }
}
Expand description
Trait which must be implemented on all root types which contain GcPtr
A type unsafe implementing Trace must call trace on each of its fields
which in turn contains GcPtr
impl<G, H, I, J> Trace for (G, H, I, J) where
G: Trace,
H: Trace,
I: Trace,
J: Trace,
impl<F, G, H, I, J> Trace for (F, G, H, I, J) where
F: Trace,
G: Trace,
H: Trace,
I: Trace,
J: Trace,
impl<E, F, G, H, I, J> Trace for (E, F, G, H, I, J) where
E: Trace,
F: Trace,
G: Trace,
H: Trace,
I: Trace,
J: Trace,
impl<D, E, F, G, H, I, J> Trace for (D, E, F, G, H, I, J) where
D: Trace,
E: Trace,
F: Trace,
G: Trace,
H: Trace,
I: Trace,
J: Trace,
impl<C, D, E, F, G, H, I, J> Trace for (C, D, E, F, G, H, I, J) where
C: Trace,
D: Trace,
E: Trace,
F: Trace,
G: Trace,
H: Trace,
I: Trace,
J: Trace,
impl<B, C, D, E, F, G, H, I, J> Trace for (B, C, D, E, F, G, H, I, J) where
B: Trace,
C: Trace,
D: Trace,
E: Trace,
F: Trace,
G: Trace,
H: Trace,
I: Trace,
J: Trace,
impl<A, B, C, D, E, F, G, H, I, J> Trace for (A, B, C, D, E, F, G, H, I, J) where
A: Trace,
B: Trace,
C: Trace,
D: Trace,
E: Trace,
F: Trace,
G: Trace,
H: Trace,
I: Trace,
J: Trace,
When traversing a GcPtr
we need to mark it