Trait mozjs_sys::jsgc::Rootable

source ·
pub trait Rootable: Traceable + Sized {
    const VTABLE: RootedVFTable = _;

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

Marker trait that allows any type that implements the [trace::Traceable] trait to be used with the Rooted type.

Rooted<T> relies on dynamic dispatch in C++ when T uses the Traceable RootKind. This trait initializes the vtable when creating a Rust instance of the Rooted object.

Provided Associated Constants§

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.

Implementations on Foreign Types§

source§

impl<T: Rootable> Rootable for Option<T>

Implementors§