Skip to main content

AfterHook

Type Alias AfterHook 

Source
pub type AfterHook = Arc<dyn for<'a> Fn(&'a ToolCallContext, HookDisposition, usize) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>> + Send + Sync + 'static>;
Expand description

Async after-hook callback type.

Receives the call context, a HookDisposition describing how the call resolved, and the approximate serialized result size in bytes (0 for DeniedBefore and InnerErrored). Spawned via tokio::spawn, so it must not assume it runs before the response is flushed.

Aliased Typeยง

pub struct AfterHook { /* private fields */ }