Trait mozjs::gc::custom::CustomAutoTraceable

source ·
unsafe trait CustomAutoTraceable: Sized {
    const vftable: CustomAutoRooterVFTable = _;

    // Required method
    fn do_trace(&self, trc: *mut JSTracer);

    // Provided method
    unsafe extern "C" fn trace(this: *mut c_void, trc: *mut JSTracer) { ... }
}
Expand description

CustomAutoRooter uses dynamic dispatch on the C++ side for custom tracing, so provide trace logic via vftable when creating an object on Rust side.

Provided Associated Constants§

Required Methods§

source

fn do_trace(&self, trc: *mut JSTracer)

Used by CustomAutoTraceable implementer to trace its contents. Corresponds to virtual trace call in a CustomAutoRooter subclass (C++).

Provided Methods§

source

unsafe extern "C" fn trace(this: *mut c_void, trc: *mut JSTracer)

Object Safety§

This trait is not object safe.

Implementors§