#[non_exhaustive]pub struct HookEventPayload {
pub hook_event_name: HookEventKind,
pub tool_name: Option<String>,
pub tool_input: Option<Value>,
pub tool_use_id: Option<String>,
pub error: Option<String>,
pub is_interrupt: Option<bool>,
pub session_id: Option<String>,
pub cwd: Option<String>,
pub file_path: Option<String>,
pub event: Option<String>,
pub extra: HashMap<String, Value>,
}Expand description
Input to a hook handler. Contains all event-specific fields. Source: chunk-0msz7hbn.js:7–323
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.hook_event_name: HookEventKindEvent that fired.
tool_name: Option<String>Tool name, for tool events.
tool_input: Option<Value>Tool input, for tool events.
tool_use_id: Option<String>Tool-use id, for tool events.
error: Option<String>Error message, for PostToolUseFailure.
is_interrupt: Option<bool>Whether the failure came from an interrupt, for PostToolUseFailure.
session_id: Option<String>Session the event belongs to.
cwd: Option<String>Working directory.
file_path: Option<String>Changed file, for FileChanged.
event: Option<String>Change kind, for FileChanged.
extra: HashMap<String, Value>Fields not named above.
Trait Implementations§
Source§impl Clone for HookEventPayload
impl Clone for HookEventPayload
Source§impl Debug for HookEventPayload
impl Debug for HookEventPayload
Source§impl<'de> Deserialize<'de> for HookEventPayload
impl<'de> Deserialize<'de> for HookEventPayload
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 Forget for HookEventPayload
impl Freeze for HookEventPayload
impl Move for HookEventPayload
impl RefUnwindSafe for HookEventPayload
impl Send for HookEventPayload
impl Sync for HookEventPayload
impl Unpin for HookEventPayload
impl UnsafeUnpin for HookEventPayload
impl UnwindSafe for HookEventPayload
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