pub trait JSObjectStorage {
    // Required methods
    fn as_raw(&self) -> *mut JSObject;
    fn from_raw(raw: *mut JSObject) -> Self;
Expand description

Trait that specifies how pointers to wrapped objects are stored. It supports two variants, one with bare pointer (to be rooted on stack using CustomAutoRooter) and wrapped in a Box<Heap>, which can be stored in a heap-allocated structure, to be rooted with JSTraceable-implementing tracers (currently implemented in Servo).

Required Methods§

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§


impl JSObjectStorage for *mut JSObject


impl JSObjectStorage for Box<Heap<*mut JSObject>>