Module function

Module function 

Source
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.