Trait mjb_gc::Trace[][src]

pub unsafe trait Trace {
    unsafe fn untrace(&self);
unsafe fn trace(&self);
unsafe fn set_undone(&self);
fn counts_match(&self) -> bool; fn could_contain_cycles() -> bool { ... } }
Expand description

A trait for tracing through Gced values.

Safety

All accessible contained Gcs must be traced.

could_contain_cycles() must return true if the type could contain cycles.

Required methods

Resets all inner Gcs for another trace cycle.

Internally, this resets the recorded reference count from inside the loop.

Safety

This function should not be used outside of Trace’s implementation.

This function traces through each inner Gc.

Internally, records a reference count from inside the loop.

Safety

This function should not be used outside of Trace’s implementation.

This function resets the done flag on a Gc.

Safety

This function should not be used outside of Trace’s implementation.

Whether all the counts match, meaning there is no external references to the set.

If there are no children, this function should return true.

This must still be called on all inner Gcs, even once one returns false. This can still be done in a single expression for most types by using & rather than &&.

Provided methods

Whether the type could contain cycles.

Implementations on Foreign Types

Implementors