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§
Statics§
- SIMPLE_
GLOBAL_ CLASS - This is a simple
JSClassfor global objects, primarily intended for tests.
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 - Trace
- Types that can be traced.
Functions§
- ToBoolean⚠
- ToInt32⚠
- ToInt64⚠
- ToNumber⚠
- ToString⚠
- ToUint16⚠
- ToUint32⚠
- ToUint64⚠
- ToWindow
Proxy ⚠IfWindow - 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 - for_of
- Helper for running
for .. ofiteration from rust. - get_
context_ ⚠realm - get_
object_ ⚠class - 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