pub unsafe trait GcTrace {
    fn trace(&self);

    fn size_hint(&self) -> usize { ... }
}
Expand description

Unsafe because if the GcTrace::trace() implementation fails to mark any Gc handles that it can reach, the Gc will not be able to mark them and will free memory that is still in use. SAFETY: Must not impl Drop

Required Methods

SAFETY: Must call Gc::mark_trace() on every reachable Gc handle

Provided Methods

If the GcTrace owns any allocations, this should return the extra allocated size. If the allocation can change size, like a Vec, then don’t include it in the size hint, or return a const estimate of the average size.

Implementations on Foreign Types

Implementors