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§
Sourcefn trace_object<Q: ObjectQueue, const KIND: u8>(
&self,
queue: &mut Q,
object: ObjectReference,
worker: &mut GCWorker<VM>,
) -> ObjectReference
fn trace_object<Q: ObjectQueue, const KIND: u8>( &self, queue: &mut Q, object: ObjectReference, worker: &mut GCWorker<VM>, ) -> ObjectReference
Trace objects in the plan.
Sourcefn post_scan_object(&self, object: ObjectReference)
fn post_scan_object(&self, object: ObjectReference)
Post-scan objects in the plan.
Sourcefn may_move_objects<const KIND: u8>() -> bool
fn may_move_objects<const KIND: u8>() -> bool
Whether objects in this plan may move.
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.