Module mozjs::rust [] [src]

Rust wrappers around the raw JS apis

Structs

AutoObjectVectorWrapper
CapturedJSStack
CompileOptionsWrapper
CustomAutoRooter
CustomAutoRooterGuard

An RAII guard used to root underlying data in CustomAutoRooter until the guard is dropped (falls out of scope). The underlying data can be accessed through this guard via its Deref and DerefMut implementations. This structure is created by root method on CustomAutoRooter or by the auto_root! macro.

IdVector
RootedGuard

Rust API for keeping a Rooted value in the context's root stack. Example usage: rooted!(in(cx) let x = UndefinedValue());. RootedGuard::new also works, but the macro is preferred.

Runtime

A wrapper for the JSRuntime and JSContext structures in SpiderMonkey.

Statics

SIMPLE_GLOBAL_CLASS

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

Traits

CustomTrace

Similarly to Trace trait, it's used to specify tracing of various types that are used in conjunction with CustomAutoRooter.

GCMethods
RootKind
Trace

Types that can be traced.

Functions

ToBoolean
ToInt32
ToInt64
ToNumber
ToString
ToUint16
ToUint32
ToUint64
define_methods

Defines methods on obj. The last entry of methods must contain zeroed memory.

define_properties

Defines attributes on obj. The last entry of properties must contain zeroed memory.

get_context_compartment
get_object_class
get_object_compartment
is_dom_class
is_dom_object
is_window
maybe_wrap_object_or_null_value
maybe_wrap_object_value
maybe_wrap_value
report_warning
try_to_outerize

Type Definitions

SequenceRooter
SequenceRooterGuard