Module value

Module value 

Source
Expand description

Boa’s ECMAScript Value implementation.

Javascript values, utility methods and conversion between Javascript values and Rust values.

Macros§

js_object
The js_value! macro creates a JsValue instance based on a JSON-like DSL.
js_value
Create a JsObject object from a simpler DSL that resembles JSON.

Structs§

Convert
A wrapper type that allows converting a JsValue to a specific type. This is useful when you want to convert a JsValue to a Rust type.
JsValue
A generic JavaScript value. This can be any ECMAScript language valid value.
ValueDisplay
This object is used for displaying a Value.

Enums§

AbstractRelation
The result of the Abstract Relational Comparison.
IntegerOrInfinity
Represents the result of the ToIntegerOrInfinity operation
JsVariant
A non-mutable variant of a JsValue. Represents either a primitive value (bool, f64, i32) or a reference to a heap allocated value (JsString, JsSymbol).
Nullable
A value that can be null in JavaScript, but not undefined.
Numeric
Numeric value which can be of two types Number, BigInt.
PreferredType
The preferred type to convert an object to a primitive Value.
Type
Possible types of values as defined at https://tc39.es/ecma262/#sec-typeof-operator.

Traits§

TryFromJs
This trait adds a fallible and efficient conversions from a JsValue to Rust types.
TryIntoJs
This trait adds a conversions from a Rust Type into JsValue.

Derive Macros§

TryFromJs
Derives the TryFromJs trait, with the #[boa()] attribute.
TryIntoJs
Derives the TryIntoJs trait, with the #[boa()] attribute.