pub enum HookEvent {
PreToolUse,
PostToolUse,
Notification,
UserPromptSubmit,
Stop,
SubagentStop,
PreCompact,
SessionStart,
SessionEnd,
Other(String),
}
Expand description
Hook event types supported by Claude Code
Variants§
PreToolUse
Triggered before a tool is executed by Claude
PostToolUse
Triggered after a tool has been executed by Claude
Notification
Triggered when Claude needs permission or input is idle
UserPromptSubmit
Triggered when the user submits a prompt
Stop
Triggered when main Claude Code agent finishes responding
SubagentStop
Triggered when a subagent (Task tool) finishes responding
PreCompact
Triggered before compact operation
SessionStart
Triggered when starting/resuming a session
SessionEnd
Triggered when session ends
Other(String)
Unknown or future hook event type
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HookEvent
impl<'de> Deserialize<'de> for HookEvent
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
impl Eq for HookEvent
impl StructuralPartialEq for HookEvent
Auto Trait Implementations§
impl Freeze for HookEvent
impl RefUnwindSafe for HookEvent
impl Send for HookEvent
impl Sync for HookEvent
impl Unpin for HookEvent
impl UnwindSafe for HookEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.