Skip to main content

add_function_hook

Function add_function_hook 

Source
pub fn add_function_hook(
    set_app_state: &dyn Fn(&dyn Fn(&mut Value)),
    session_id: &str,
    event: &HookEvent,
    matcher: &str,
    callback: Arc<dyn Fn(&[Value]) -> bool + Send + Sync>,
    error_message: String,
    timeout: Option<u64>,
    id: Option<String>,
) -> String
Expand description

Add a function hook to the session. Function hooks execute TypeScript callbacks in-memory for validation. Returns the hook ID (for removal)