Add Hook • Rust AI Agent SDK
add_hook: Add a hook
add_hook
Method
</div>
This is a method of the HookRegistry class in the hooks module.
Add a hook
Signature
def add_hook(
&mut self,
event: HookEvent,
func: impl Fn(&HookInput) -> HookResult + Send + Sync + 'static,
) -> &mut SelfParameters
ParamField
HookEventNo description available.
ParamField
impl Fn(&HookInputNo description available.
Returns
ResponseField
&mut Self”> The result of the operation.