Trait mozjs_sys::jsgc::TraceableTrace

source ·
pub unsafe trait TraceableTrace: Sized {
    const VTABLE: RootedVFTable = _;

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

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

Rooted<T> with a T that uses the Traceable RootKind uses dynamic dispatch on the C++ side for custom tracing. This trait provides trace logic via a vtable when creating a Rust instance of the object.

Provided Associated Constants§

Required Methods§

source

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

Used by TraceableTrace implementer to trace its contents. Corresponds to virtual trace call in a Rooted that inherits from StackRootedTraceableBase (C++).

Provided Methods§

source

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

Object Safety§

This trait is not object safe.

Implementors§