Module mozjs::rust

source ·
Expand description

Rust wrappers around the raw JS apis


pub use crate::gc::*;


Wrappers for JSAPI methods that accept lifetimed Handle and MutableHandle arguments.
Wrappers for JSAPI methods that should NOT be used.


A handle that must be kept alive in order to create new Runtimes. When this handle is dropped, the engine is shut down and cannot be reinitialized.
A handle to a Runtime that will be used to create a new runtime in another thread. This handle and the new runtime must be destroyed before the original runtime can be dropped.
A wrapper for the JSContext structure in SpiderMonkey.




This is a simple JSClass for global objects, primarily intended for tests.


A trait for types which can place appropriate GC barriers.
Trait for things that can be converted to handles For any type T: IntoHandle we have an implementation of From<T> for MutableHandle<T::Target>. This is a way round the orphan rule.
ToResult 🔒
Types that can be traced.