Add Hook With Matcher • Rust AI Agent SDK

add_hook_with_matcher: Add a hook with matcher

add_hook_with_matcher

Method

</div>

This is a method of the HookRegistry class in the hooks module.

Add a hook with matcher

Diagram

Allow

Deny

Event Trigger

Hook: add_hook_with_matcher

Decision

Process

Block

Signature

python
def add_hook_with_matcher(
        &mut self,
        event: HookEvent,
        matcher: impl Into<String>,
        func: impl Fn(&HookInput) -> HookResult + Send + Sync + 'static,
    ) -> &mut Self

Parameters

ParamField HookEvent

No description available.

ParamField impl Into&lt;String&gt;

No description available.

ParamField impl Fn(&HookInput

No description available.

Returns

ResponseField

&mut Self”> The result of the operation.


Related Documentation