Expand description
Utilities for calling JavaScript functions and retrieving values from JavaScript object properties.
Functionsยง
- apply_
with_ args0 - Call a JavaScript function without arguments
- apply_
with_ args1 - Call a JavaScript function with a single argument
- apply_
with_ args2 - Call a JavaScript function with two arguments
- try_
get_ bool_ from_ prop - Obtain a
bool
value from the object propertyprop
- try_
get_ f64_ from_ prop - Obtain
f64
value from an object property. Results in anError
if the value is not a number. - try_
get_ js_ value_ prop - Obtain a JsValue from a JavaScript object property.
Results in an
Error
if the property does not exist. - try_
get_ string_ from_ prop - Obtain a
String
value from the object propertyprop
- try_
get_ u8_ from_ prop - Obtain
u8
value from the object propertyprop
. Results in anError
if the value is not a number or the number value is out of bounds (0..u8::MAX). - try_
get_ u16_ from_ prop - Obtain
u16
value from the object propertyprop
. Results in anError
if the value is not a number or the number value is out of bounds (0..u16::MAX). - try_
get_ u32_ from_ prop - Obtain
u32
value from the object propertyprop
. - try_
get_ u64_ from_ prop - Obtain a
u64
value from an object property. Results in anError
if the value is not a number, roundedu64
if the value is a number. - try_
get_ vec_ from_ prop - Obtain
Vec<JsValue>
by treating the object propertyprop
as an array - try_
get_ vec_ u8_ from_ bn - Obtain
Vec<u8>
from the supplied big number - try_
get_ vec_ u8_ from_ bn_ prop - Obtain a
Vec<u8>
from the propertyprop
expressed as a big number - try_
get_ vec_ u8_ from_ number_ array_ prop - Obtain a
Vec<u8>
value from the object propertyprop
(usingUint8Array
) - try_
get_ vec_ u8_ from_ uint8_ array_ prop - Obtain a
Vec<u8>
value from the object propertyprop
(usingUint8Array
)