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
GcTracing<T>impl BoehmTraced for intimpl BoehmTraced for i8impl BoehmTraced for i16impl BoehmTraced for i32impl BoehmTraced for i64impl BoehmTraced for uintimpl BoehmTraced for u8impl BoehmTraced for u16impl BoehmTraced for u32impl BoehmTraced for u64impl BoehmTraced for f32impl BoehmTraced for f64impl BoehmTraced for ()impl<T> BoehmTraced for *Timpl<T> BoehmTraced for *mut Timpl<T: BoehmTraced> BoehmTraced for RefCell<T>impl<T: BoehmTraced> BoehmTraced for Option<T>impl<T: BoehmTraced> BoehmTraced for [T, ..100]impl<T: BoehmTraced> BoehmTraced for [T, ..1000]impl<T: BoehmTraced> BoehmTraced for [T, ..10_000]impl<T: BoehmTraced> BoehmTraced for [T, ..100_000]impl<T: BoehmTraced> BoehmTraced for [T, ..1_000_000]