Expand description
Generic JavaScript-callback alias used by the host protocol exports.
Structs§
- Invalid
Return Value - Used as the fallback branch in
Either<Ret, InvalidReturnValue>to catch type mismatches from JS function options. Always passes NAPI validation so that whenRetvalidation fails, the error is handled in Rust with a clear message instead of becoming an uncatchablenapi_fatal_exception.
Type Aliases§
- JsCallback
JsCallbackis a type alias for a weak, caller-handledThreadsafeFunctionwhose return value is validated in Rust: it represents a JavaScript function passed to the Rust side.