[src]

Trait boehm::tracing::BoehmTraced

pub trait BoehmTraced {
    fn indicate_ptr_words(_dummy: Option<Self>, words: &mut [bool]);

    fn get_tracing_descr(dummy: Option<Self>) -> GC_descr { ... }
}

Values that the precise-on-heap Boehm collector can understand.

This trait is a stop-gap until the compiler itself can generate such information, since writing these by hand is annoying, and nearly impossible to get correct without dirty hacks to find alignment of fields and extract (for example) the enum optimisation that have occurred (and even then, they're likely to no be correct).

Required Methods

fn indicate_ptr_words(_dummy: Option<Self>, words: &mut [bool])

Mark which words within Self can possibly hold relevant pointers (do not explicitly mark which words are not pointers).

E.g. struct Foo { x: uint, y: GcTracing<uint>, z: GcTracing<uint> } should explicitly set words[1] and words[2] to true but leave words[0] untouched.

As long as get_tracing_descr is not overridden, words is guaranteed to be large enough to hold all the words in the current type.

Provided Methods

fn get_tracing_descr(dummy: Option<Self>) -> GC_descr

Construct the GC_descr of Self. This should not be overriden.

Implementors