Module workflow_wasm::utils
source · Expand description
Utilities for calling JavaScript functions and retrieving values from JavaScript object properties.
Functions§
- Call a JavaScript function without arguments
- Call a JavaScript function with a single argument
- Call a JavaScript function with two arguments
- Obtain a
boolvalue from the object propertyprop - Obtain
f64value from an object property. Results in anErrorif the value is not a number. - Obtain a JsValue from a JavaScript object property. Results in an
Errorif the property does not exist. - Obtain a
Stringvalue from the object propertyprop - Obtain
u8value from the object propertyprop. Results in anErrorif the value is not a number or the number value is out of bounds (0..u8::MAX). - Obtain
u16value from the object propertyprop. Results in anErrorif the value is not a number or the number value is out of bounds (0..u16::MAX). - Obtain
u32value from the object propertyprop. - Obtain a
u64value from an object property. Results in anErrorif the value is not a number, roundedu64if the value is a number. - Obtain
Vec<JsValue>by treating the object propertypropas an array - Obtain
Vec<u8>from the supplied big number - Obtain a
Vec<u8>from the propertypropexpressed as a big number - Obtain a
Vec<u8>value from the object propertyprop(usingUint8Array) - Obtain a
Vec<u8>value from the object propertyprop(usingUint8Array)