Skip to main content

HookCallback

Type Alias HookCallback 

Source
pub type HookCallback = Arc<dyn Fn(HookInput, Option<String>, HookContext) -> Pin<Box<dyn Future<Output = HookOutput> + Send + 'static>> + Send + Sync>;
Expand description

The callback function invoked when a hook matches.

Arguments:

  • HookInput โ€” details about the event
  • Option<String> โ€” session ID (if available)
  • HookContext โ€” additional context

Returns a HookOutput with the decision and optional modifications.

Aliased Typeยง

pub struct HookCallback { /* private fields */ }