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 int
impl BoehmTraced for i8
impl BoehmTraced for i16
impl BoehmTraced for i32
impl BoehmTraced for i64
impl BoehmTraced for uint
impl BoehmTraced for u8
impl BoehmTraced for u16
impl BoehmTraced for u32
impl BoehmTraced for u64
impl BoehmTraced for f32
impl BoehmTraced for f64
impl BoehmTraced for ()
impl<T> BoehmTraced for *T
impl<T> BoehmTraced for *mut T
impl<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]