Available on crate features
js and std only.Expand description
Embedded javascript execution, see [rama_js] for more info.
Modules§
- pac
pac - Proxy Auto-Configuration (PAC) support for Rama.
Structs§
- Console
- The
consolehost 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. - JsHost
Class - A reusable definition of the methods and properties exposed by a
JsHostObject. - JsHost
Class Builder - Builder for a reusable
JsHostClass. - JsHost
Handle - A one-shot handle used to recover a value owned by a
JsHostObject. - JsHost
Object - A Rust-owned value exposed to JavaScript as a native object.
- JsHost
Object Builder - 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.
- JsRuntime
Builder - Builder to configure and create a
JsRuntime. - JsSnapshot
Limits - 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
JsRuntimeowned by a dedicated OS thread: the compile-once, call-many execution model. - JsWorker
Builder - Builder to configure and
spawnaJsWorker. - Serde
- Wrapper to move any
serde-capable type across the js boundary. - Serde
Output JsFnOutputmarker forSerde-wrapped values.
Enums§
- JsError
Kind - The kind of a
JsError. - JsValue
- An engine-agnostic js value.
Traits§
- Into
JsGlobal - Everything that can be registered as a global on a
JsRuntimeBuilder: values convertibleInto<JsValue>as well asJsNamespacehost objects. - JsArg
- A typed host function argument, extracted from a
JsValue. - JsFn
- A host function with typed, extractor-style arguments.
- JsFn
Output - A value a host function can return: either a plain value
convertible
Into<JsValue>, or aResultthereof with an error convertibleInto<JsError>(thrown inside the script). - JsHost
Fn - A read-only method with typed, extractor-style arguments.
- JsHost
FnMut - A mutable method with typed, extractor-style arguments.
- JsHost
Getter - A typed getter for a
JsHostObjectproperty. - JsHost
Setter - A typed setter for a
JsHostObjectproperty.