PlanTraceObject

Trait PlanTraceObject 

Source
pub trait PlanTraceObject<VM: VMBinding> {
    // Required methods
    fn trace_object<Q: ObjectQueue, const KIND: u8>(
        &self,
        queue: &mut Q,
        object: ObjectReference,
        worker: &mut GCWorker<VM>,
    ) -> ObjectReference;
    fn post_scan_object(&self, object: ObjectReference);
    fn may_move_objects<const KIND: u8>() -> bool;
}
Expand description

A plan that uses PlanTrace needs to provide an implementation for this trait. Generally a plan does not need to manually implement this trait. Instead, we provide a procedural macro that helps generate an implementation. Please check macros/trace_object.

A plan could also manually implement this trait. For the sake of performance, the implementation of this trait should mark methods as [inline(always)].

Required Methods§

Source

fn trace_object<Q: ObjectQueue, const KIND: u8>( &self, queue: &mut Q, object: ObjectReference, worker: &mut GCWorker<VM>, ) -> ObjectReference

Trace objects in the plan.

See crate::plan::tracing::Trace::trace_object.

Source

fn post_scan_object(&self, object: ObjectReference)

Post-scan objects in the plan.

See crate::plan::tracing::Trace::post_scan_object.

Source

fn may_move_objects<const KIND: u8>() -> bool

Whether objects in this plan may move.

See crate::plan::tracing::Trace::post_scan_object.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§