Skip to main content

Module js

Module js 

Source
Available on crate features js and std only.
Expand description

Embedded javascript execution, see [rama_js] for more info.

Modules§

pacpac
Proxy Auto-Configuration (PAC) support for Rama.

Structs§

Console
The console host object: nothing more than a regular global with the well-known console methods as host functions.
JsArgs
All arguments of a host function call, for variadic host functions.
JsArray
An immutable snapshot of a js array.
JsError
Error returned by all fallible operations in this crate.
JsGlobal
Opaque lowered form of a global registration; see IntoJsGlobal.
JsHostClass
A reusable definition of the methods and properties exposed by a JsHostObject.
JsHostClassBuilder
Builder for a reusable JsHostClass.
JsHostHandle
A one-shot handle used to recover a value owned by a JsHostObject.
JsHostObject
A Rust-owned value exposed to JavaScript as a native object.
JsHostObjectBuilder
Builder for a JsHostObject.
JsNamespace
A global host object: a named bag of host functions and values, exposed to scripts as a single global object via JsRuntimeBuilder::with_global.
JsObject
An immutable, insertion-ordered snapshot of a js object.
JsRuntime
A javascript runtime, executing scripts on the current thread.
JsRuntimeBuilder
Builder to configure and create a JsRuntime.
JsSnapshotLimits
Resource limits applied while copying values out of the JavaScript engine.
JsStr
A cheap, immutable string used for values crossing the js boundary.
JsWorker
A JsRuntime owned by a dedicated OS thread: the compile-once, call-many execution model.
JsWorkerBuilder
Builder to configure and spawn a JsWorker.
Serde
Wrapper to move any serde-capable type across the js boundary.
SerdeOutput
JsFnOutput marker for Serde-wrapped values.

Enums§

JsErrorKind
The kind of a JsError.
JsValue
An engine-agnostic js value.

Traits§

IntoJsGlobal
Everything that can be registered as a global on a JsRuntimeBuilder: values convertible Into<JsValue> as well as JsNamespace host objects.
JsArg
A typed host function argument, extracted from a JsValue.
JsFn
A host function with typed, extractor-style arguments.
JsFnOutput
A value a host function can return: either a plain value convertible Into<JsValue>, or a Result thereof with an error convertible Into<JsError> (thrown inside the script).
JsHostFn
A read-only method with typed, extractor-style arguments.
JsHostFnMut
A mutable method with typed, extractor-style arguments.
JsHostGetter
A typed getter for a JsHostObject property.
JsHostSetter
A typed setter for a JsHostObject property.