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ยง
- CapturedJS
Stack - Compile
Options Wrapper - Environment
Chain - IdVector
- JSAuto
Structured Clone Buffer Wrapper - 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.
- JSEngine
Handle - Parent
Runtime - 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.
- Realm
Options - Rooted
Object Vector Wrapper - Runtime
- A wrapper for the
JSContext
structure in SpiderMonkey. - Scripted
Caller - Stencil
- Thread
SafeJS Context - A version of the
JSContext
that can be used from other threads and is thusSend
andSync
. 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ยง
- Engine
State ๐ - JSEngine
Error
Constantsยง
- CONTEXT ๐
- Chunk
Shift ๐ - Chunk
Size ๐ - 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.
- Into
Handle - Trait for things that can be converted to handles
For any type
T: IntoHandle
we have an implementation ofFrom<T>
forMutableHandle<T::Target>
. This is a way round the orphan rule. - Into
Mutable Handle - ToResult ๐
- Trace
- Types that can be traced.
Functionsยง
- ToBooleanโ
- ToInt32โ
- ToInt64โ
- ToNumberโ
- ToStringโ
- ToUint16โ
- ToUint32โ
- ToUint64โ
- ToWindow
Proxy โIfWindow - convert_
from_ ๐ โint32 - define_
methods โ - Defines methods on
obj
. The last entry ofmethods
must contain zeroed memory. - define_
properties โ - Defines attributes on
obj
. The last entry ofproperties
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