pub struct HookMatcher {
pub tool_name_pattern: Option<String>,
pub timeout: Duration,
}Expand description
Matcher that selects which events a hook applies to.
Fields§
§tool_name_pattern: Option<String>Optional tool name glob (e.g. "read_file", "*_file").
None matches all.
timeout: DurationTimeout for this hook invocation.
Implementations§
Source§impl HookMatcher
impl HookMatcher
Sourcepub fn matches_tool(&self, tool_name: &str) -> bool
pub fn matches_tool(&self, tool_name: &str) -> bool
Returns true if the matcher applies to the given tool name.
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 Debug for HookMatcher
impl Debug for HookMatcher
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