pub struct HookMatcher {
pub matcher: Option<String>,
pub hooks: Vec<HookCallback>,
pub timeout: Option<f64>,
}Expand description
Configuration for matching hooks to specific events or tools.
§Fields
matcher— Optional tool name or regex pattern to match (e.g.,"Bash","Write|Edit"). IfNone, the hook applies to all tools.hooks— List of callback functions to execute when matched.timeout— Optional timeout in seconds for all hooks in this matcher (default: 60).
Fields§
§matcher: Option<String>Optional matcher expression for selecting hook targets.
hooks: Vec<HookCallback>Hook callbacks to execute when this matcher is selected.
timeout: Option<f64>Optional timeout in seconds applied to callbacks in this matcher.
Trait Implementations§
Source§impl Clone for HookMatcher
impl Clone for HookMatcher
Source§fn clone(&self) -> HookMatcher
fn clone(&self) -> HookMatcher
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for HookMatcher
impl Default for HookMatcher
Source§fn default() -> HookMatcher
fn default() -> HookMatcher
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HookMatcher
impl !RefUnwindSafe for HookMatcher
impl Send for HookMatcher
impl Sync for HookMatcher
impl Unpin for HookMatcher
impl UnsafeUnpin for HookMatcher
impl !UnwindSafe for HookMatcher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more