pub struct HookMatcher {
pub tool: Option<String>,
pub path_pattern: Option<String>,
pub command_pattern: Option<String>,
pub session_id: Option<String>,
pub skill: Option<String>,
}Expand description
Hook matcher for filtering events
Fields§
§tool: Option<String>Match specific tool name (exact match)
path_pattern: Option<String>Match file path pattern (glob)
command_pattern: Option<String>Match command pattern (regex for Bash commands)
session_id: Option<String>Match session ID (exact match)
skill: Option<String>Match skill name (supports glob patterns)
Implementations§
Source§impl HookMatcher
impl HookMatcher
Sourcepub fn skill(name: impl Into<String>) -> Self
pub fn skill(name: impl Into<String>) -> Self
Create a matcher for a specific skill (supports glob patterns)
Sourcepub fn with_command(self, pattern: impl Into<String>) -> Self
pub fn with_command(self, pattern: impl Into<String>) -> Self
Add command pattern filter
Sourcepub fn with_session(self, id: impl Into<String>) -> Self
pub fn with_session(self, id: impl Into<String>) -> Self
Add session filter
Sourcepub fn with_skill(self, name: impl Into<String>) -> Self
pub fn with_skill(self, name: impl Into<String>) -> Self
Add skill filter (supports glob patterns)
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
Source§impl Default for HookMatcher
impl Default for HookMatcher
Source§fn default() -> HookMatcher
fn default() -> HookMatcher
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HookMatcher
impl<'de> Deserialize<'de> for HookMatcher
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. 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