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
- wrappers2
- Wrappers for JSAPI/glue methods that accept lifetimed crate::rust::Handle and crate::rust::MutableHandle arguments and crate::context::JSContext
StructsΒ§
- CapturedJS
Stack - Compile
Options Wrapper - Environment
Chain - Error
Info - 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
JSContextstructure in SpiderMonkey. - Scripted
Caller - Stencil
- Thread
SafeJS Context - A version of the
JSContextthat can be used from other threads and is thusSendandSync. 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
JSClassfor 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: IntoHandlewe 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 ofmethodsmust contain zeroed memory. - define_
properties β - Defines attributes on
obj. The last entry ofpropertiesmust contain zeroed memory. - describe_
scripted_ βcaller - error_
info_ βfrom_ exception_ stack - Retrieve error info from the pending exception stack, by clearing it. Return None if there isnβt one or if it is a warning.
- evaluate_
script - fill_
string_ π βcallback - 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