pub unsafe fn build_closure_trampoline<F>(
closure: F,
) -> ((Box<WrappedCallback>, Box<JSValue>), JSCFunctionData)Expand description
Taken from: https://s3.amazonaws.com/temp.michaelfbryan.com/callbacks/index.html
Create a C wrapper function for a Rust closure to enable using it as a callback function in the Quickjs runtime.
Both the boxed closure and the boxed data are returned and must be stored by the caller to guarantee they stay alive.