Module rust

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
wrappers2
Wrappers for JSAPI/glue methods that accept lifetimed crate::rust::Handle and crate::rust::MutableHandle arguments and crate::context::JSContext

StructsΒ§

CapturedJSStack
CompileOptionsWrapper
EnvironmentChain
ErrorInfo
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⚠
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βš