Expand description
JavaScript function references and Rust callback management.
This module provides types for calling JavaScript functions from Rust and for registering Rust callbacks that can be called from JavaScript.
Structs§
- JSFunction
- A reference to a JavaScript function that can be called from Rust.
Constants§
- CALL_
EXPORT_ FN_ ID - Reserved function ID for calling exported Rust struct methods from JS. JS sends this with the export name to call the appropriate handler.
- DROP_
NATIVE_ REF_ FN_ ID - Reserved function ID for dropping native Rust refs when JS objects are GC’d. JS sends this when a FinalizationRegistry callback fires for a RustFunction.