Module value

Module value 

Source
Expand description

JavaScript value representation

The core JsValue type and related structures for representing JavaScript values at runtime.

Structs§

Accessor
Accessor functions (getter and/or setter) - boxed to save space for data properties
Binding
Variable binding
BoundFunctionData
Data for a bound function
BytecodeFunction
Bytecode-compiled function
BytecodeGeneratorState
Generator state for bytecode-based generators
EnumData
Enum internal state
EnumMember
Enum member - stores name and value
EnvironmentData
Environment data stored in Environment exotic objects.
GeneratorState
Generator state for suspended generators
Guarded
A JsValue bundled with a Guard that keeps it alive.
GuardedEnv
A guarded environment that keeps itself alive via its guard.
ImportBinding
Reference to a module export for live bindings
JsMapKey
A wrapper around JsValue that implements Hash and Eq using SameValueZero semantics.
JsObject
A JavaScript object
JsString
Reference-counted string for efficient string handling
JsSymbol
JavaScript Symbol primitive Symbols are unique identifiers, optionally with a description
NativeFunction
Native function wrapper
PrivateFieldKey
Key for looking up private fields in an object.
PromiseAllSharedState
Shared state for Promise.all tracking This is shared across all handlers via Rc
PromiseHandler
Handler attached via .then()/.catch()
PromiseRaceSharedState
Shared state for Promise.race tracking First promise to settle wins
PromiseState
Promise internal state
Property
A property descriptor - optimized for size. Most properties are simple data properties, so we optimize for that case.
ProxyData
Proxy internal state
SavedFrameState
Saved frame state for generators This stores the frames and values that need to be restored when resuming
VarKey
A key for variable lookups that uses pointer-based hashing.

Enums§

ExoticObject
Exotic object behavior
GeneratorStatus
Status of generator execution
JsFunction
Function representation
JsValue
A JavaScript value
ModuleExport
Represents a module export entry - either a direct export from this module’s environment, or a re-export from another module.
PromiseStatus
Promise status
PropertyKey
Property key (string, index, or symbol)
PropertyStorage
Optimized property storage that uses inline storage for small objects.
PropertyStorageIter
Iterator over PropertyStorage entries.
PropertyStorageIterMut
Mutable iterator over PropertyStorage entries.

Traits§

CheapClone
Trait for types that have cheap (O(1), reference-counted) clones.

Functions§

create_environment_unrooted
Create a new environment object with its own temporary guard.
create_environment_unrooted_with_capacity
Create a new environment object with pre-allocated capacity for bindings.
create_environment_with_guard
Create a new environment object with a temporary guard.
create_guarded_env
Create a new guarded environment.
number_to_string
Convert a JavaScript number to its canonical string representation.
string_to_number
Convert a JavaScript string to a number according to ECMAScript ToNumber.

Type Aliases§

ClassBrandId
Unique identifier for a private field/method.
EnvRef
Environment reference - a GC-managed environment object.
JsObjectRef
Reference to a heap-allocated object (GC-managed)
NativeFn
Native function signature type Returns Guarded to keep newly created objects alive until ownership is transferred.