pub struct HookSpec {
pub event: HookEvent,
pub matcher: Option<String>,
pub command: String,
pub timeout_secs: Option<u64>,
}Expand description
A user-configured hook spec. Mirrors the [[hooks]] config schema.
Fields§
§event: HookEventEvent the hook subscribes to.
matcher: Option<String>Tool-name glob matcher (e.g. "bash|write"). None matches all.
command: StringShell command to execute. The runner uses sh -c "<command>".
timeout_secs: Option<u64>Per-invocation timeout in seconds. None → runner default (60s).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HookSpec
impl<'de> Deserialize<'de> for HookSpec
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 HookSpec
impl RefUnwindSafe for HookSpec
impl Send for HookSpec
impl Sync for HookSpec
impl Unpin for HookSpec
impl UnsafeUnpin for HookSpec
impl UnwindSafe for HookSpec
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