Skip to main content

WhiskerModuleObserverHook

Type Alias WhiskerModuleObserverHook 

Source
pub type WhiskerModuleObserverHook = extern "C" fn(module_name: *const c_char, event_name: *const c_char);
Expand description

Callback type for OnStartObserving / OnStopObserving hooks. The bridge fires these on the 0↔1 listener-count transition for a (module, event) pair. Both module_name and event_name are borrowed (NUL-terminated UTF-8) — copy if you need to retain them past the call. module_name lets a shared platform-side trampoline index its own per-module table.