Skip to main content

Module host

Module host 

Source
Expand description

Building blocks for the native objects the host crates install: promises settled later from Rust, errors, JSON values as JS values, accessors on plain objects.

Structs§

Settler
The resolve and reject of a promise kept alive until one of them runs.

Functions§

deferred⚠
A pending promise and what settles it.
error⚠
A TypeError (or RangeError) or a DOMException named name, as a value.
frozen_strings⚠
A frozen array of strings.
getter⚠
global⚠
has_warned
install_object⚠
An object for a host API, held for the context and reachable as the hidden global name.
is_string⚠
method⚠
rejected⚠
rejected_with⚠
resolved⚠
string_arg⚠
stringify⚠
JSON.stringify(v), or None when it throws or gives undefined.
throw⚠
Throws error(name, msg); the host function returns what this returns.
to_js⚠
truthy⚠
warn_compat⚠
console.warn once per key for this thread; false when key was already said.