pub enum HookEvent {
SessionStart,
UserPromptSubmit,
PreToolUse,
PermissionRequest,
PostToolUse,
PostToolUseFailure,
Notification,
SubagentStart,
SubagentStop,
Stop,
PreCompact,
SessionEnd,
}Expand description
Claude Code hook events
Matches Claude’s event names exactly when serialized. See: https://docs.anthropic.com/en/docs/claude-code/hooks
Variants§
SessionStart
Session begins or resumes
UserPromptSubmit
User submits prompt
PreToolUse
Before tool execution
PermissionRequest
Permission dialog shown
PostToolUse
After tool succeeds
PostToolUseFailure
After tool fails
Notification
Notification sent
SubagentStart
Subagent spawned
SubagentStop
Subagent finishes
Stop
Claude finishes response
PreCompact
Before compaction
SessionEnd
Session terminates
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 Copy for HookEvent
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