pub struct HookExecution {
pub session_id: String,
pub timestamp_ms: u64,
pub hook_event: String,
pub hook_name: String,
pub command: String,
pub exit_code: i32,
pub duration_ms: u64,
pub tool_use_id: Option<String>,
}Expand description
A single hook execution event from a type: "attachment" JSONL record
where attachment.type == "hook_success".
Fields§
§session_id: String§timestamp_ms: u64§hook_event: StringLifecycle phase: PreToolUse, PostToolUse, SessionStart, Stop, etc.
hook_name: StringFull hook label including matcher: PreToolUse:Bash, Stop, etc.
command: StringThe shell command that was executed.
exit_code: i32§duration_ms: u64§tool_use_id: Option<String>The tool-use ID that triggered this hook (groups multiple hooks per tool call).
Trait Implementations§
Source§impl Clone for HookExecution
impl Clone for HookExecution
Source§fn clone(&self) -> HookExecution
fn clone(&self) -> HookExecution
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 HookExecution
impl Debug for HookExecution
Source§impl<'de> Deserialize<'de> for HookExecution
impl<'de> Deserialize<'de> for HookExecution
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 HookExecution
impl RefUnwindSafe for HookExecution
impl Send for HookExecution
impl Sync for HookExecution
impl Unpin for HookExecution
impl UnsafeUnpin for HookExecution
impl UnwindSafe for HookExecution
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