Module rust

Source
Expand description

Rust wrappers around the raw JS apis

Re-exportsยง

pub use crate::gc::*;

Modulesยง

wrappers
Wrappers for JSAPI methods that accept lifetimed Handle and MutableHandle arguments

Structsยง

CapturedJSStack
CompileOptionsWrapper
EnvironmentChain
IdVector
JSAutoStructuredCloneBufferWrapper
JSEngine
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.
JSEngineHandle
ParentRuntime
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.
RealmOptions
RootedObjectVectorWrapper
Runtime
A wrapper for the JSContext structure in SpiderMonkey.
ScriptedCaller
Stencil
ThreadSafeJSContext
A version of the JSContext that can be used from other threads and is thus Send and Sync. This should only ever expose operations that are marked as thread-safe by the SpiderMonkey API, ie ones that only atomic fields in JSContext.

Enumsยง

EngineState ๐Ÿ”’
JSEngineError

Constantsยง

CONTEXT ๐Ÿ”’
ChunkShift ๐Ÿ”’
ChunkSize ๐Ÿ”’
STACK_QUOTA ๐Ÿ”’
SYSTEM_CODE_BUFFER ๐Ÿ”’
TRUSTED_SCRIPT_BUFFER ๐Ÿ”’

Staticsยง

ENGINE_STATE ๐Ÿ”’
SIMPLE_GLOBAL_CLASS
This is a simple JSClass for global objects, primarily intended for tests.
SIMPLE_GLOBAL_CLASS_OPS ๐Ÿ”’

Traitsยง

GCMethods
A trait for types which can place appropriate GC barriers.
IntoHandle
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.
IntoMutableHandle
ToResult ๐Ÿ”’
Trace
Types that can be traced.

Functionsยง

ToBooleanโš 
ToInt32โš 
ToInt64โš 
ToNumberโš 
ToStringโš 
ToUint16โš 
ToUint32โš 
ToUint64โš 
ToWindowProxyIfWindowโš 
convert_from_int32 ๐Ÿ”’ โš 
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.
describe_scripted_callerโš 
get_context_realmโš 
get_object_classโš 
get_object_group ๐Ÿ”’ โš 
get_object_realmโš 
is_dom_class
is_dom_objectโš 
is_windowโš 
maybe_wrap_objectโš 
maybe_wrap_object_or_null_valueโš 
maybe_wrap_object_valueโš 
maybe_wrap_valueโš 
report_warningโš 
transform_str_to_source_text
transform_u16_to_source_text
try_to_outerizeโš 
try_to_outerize_objectโš