pub struct HookContext {
pub hook_event: String,
pub tool_name: String,
pub files_touched: Vec<String>,
pub cwd: String,
pub command: Option<String>,
}Expand description
Context for evaluating rules against current operation.
Fields§
§hook_event: StringWhich hook event is firing (e.g., “PreToolUse”, “PostToolUse”).
tool_name: StringTool being used (e.g., “Bash”, “Write”, “Edit”).
files_touched: Vec<String>Files being modified in this operation.
cwd: StringCurrent working directory.
command: Option<String>The command about to run (Bash tool_input.command), when available.
Trait Implementations§
Source§impl Clone for HookContext
impl Clone for HookContext
Source§fn clone(&self) -> HookContext
fn clone(&self) -> HookContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 HookContext
impl Debug for HookContext
Source§impl Default for HookContext
impl Default for HookContext
Source§fn default() -> HookContext
fn default() -> HookContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HookContext
impl RefUnwindSafe for HookContext
impl Send for HookContext
impl Sync for HookContext
impl Unpin for HookContext
impl UnsafeUnpin for HookContext
impl UnwindSafe for HookContext
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