pub struct RawHookEvent {Show 22 fields
pub session_id: String,
pub hook_event_name: String,
pub cwd: Option<String>,
pub permission_mode: Option<String>,
pub pid: Option<u32>,
pub tmux_pane: Option<String>,
pub tool_name: Option<String>,
pub tool_input: Option<Value>,
pub tool_response: Option<Value>,
pub tool_use_id: Option<String>,
pub prompt: Option<String>,
pub stop_hook_active: Option<bool>,
pub agent_id: Option<String>,
pub agent_type: Option<String>,
pub agent_transcript_path: Option<String>,
pub source: Option<String>,
pub reason: Option<String>,
pub model: Option<String>,
pub trigger: Option<String>,
pub custom_instructions: Option<String>,
pub notification_type: Option<String>,
pub message: Option<String>,
}Expand description
Raw hook event JSON structure from Claude Code.
Flat structure with all possible fields as Option
Fields§
§session_id: String§hook_event_name: String§cwd: Option<String>§permission_mode: Option<String>§pid: Option<u32>§tmux_pane: Option<String>§tool_name: Option<String>§tool_input: Option<Value>§tool_response: Option<Value>§tool_use_id: Option<String>§prompt: Option<String>§stop_hook_active: Option<bool>§agent_id: Option<String>§agent_type: Option<String>§agent_transcript_path: Option<String>§source: Option<String>§reason: Option<String>§model: Option<String>§trigger: Option<String>§custom_instructions: Option<String>§notification_type: Option<String>§message: Option<String>Implementations§
Source§impl RawHookEvent
impl RawHookEvent
Sourcepub fn event_type(&self) -> Option<HookEventType>
pub fn event_type(&self) -> Option<HookEventType>
Parses the hook event type.
Sourcepub fn session_id(&self) -> SessionId
pub fn session_id(&self) -> SessionId
Returns the session ID.
Trait Implementations§
Source§impl Clone for RawHookEvent
impl Clone for RawHookEvent
Source§fn clone(&self) -> RawHookEvent
fn clone(&self) -> RawHookEvent
Returns a duplicate of the value. Read more
1.0.0 · 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 RawHookEvent
impl Debug for RawHookEvent
Source§impl<'de> Deserialize<'de> for RawHookEvent
impl<'de> Deserialize<'de> for RawHookEvent
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 RawHookEvent
impl RefUnwindSafe for RawHookEvent
impl Send for RawHookEvent
impl Sync for RawHookEvent
impl Unpin for RawHookEvent
impl UnsafeUnpin for RawHookEvent
impl UnwindSafe for RawHookEvent
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