Module workflow_wasm::abi
source · Expand description
Functions to obtain Rust object references from WASM ABI.
Macros
- Create a reference to a Rust object from a WASM ABI.
- Create a Rust
Option<object>
from a WASM ABI.
Functions
- Create a reference to a Rust object from a WASM ABI.
- Create a reference to a Rust object from a WASM ABI. This function validates the supplied object by comparing its
constructor.name
value to the suppliedclass
name. You can use this function in two forms:ref_from_abi_safe("SomeStruct", jsvalue)
or via a macroref_from_abi!(SomeStruct,jsvalue)
. - Create a reference to a Rust object from a WASM ABI. Returns None is the supplied value is
null
orundefined
, otherwise tries to cast the object. Casting validates the supplied object by comparing itsconstructor.name
value to the suppliedclass
name. You can use this function in two forms:ref_from_abi_safe_as_option("SomeStruct", jsvalue)
or via a macroref_from_abi_as_option!(SomeStruct,jsvalue)
.