Skip to main content

add_hook_with_matcher

Method
This is a method of the HookRegistry class in the hooks module.
Add a hook with matcher

Signature

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

Parameters

event
HookEvent
required
No description available.
matcher
impl Into<String>
required
No description available.
func
impl Fn(&HookInput
required
No description available.

Returns

Returns
HookResult + Send + Sync + 'static, ) -> &mut Self
The result of the operation.