pub struct PostToolUseEvent {
pub tool_name: String,
pub tool_input: Value,
pub tool_use_id: String,
pub tool_result: Value,
pub history: Vec<Value>,
}Expand description
Snapshot passed to an automatic post-tool hook.
tool_input reflects any pre-hook replacement. history includes the pending,
unmodified result; a post-hook replacement affects the result stored afterward.
Fields§
§tool_name: StringName of the tool that was executed
tool_input: ValueInput parameters that were actually used (may differ from original if modified by PreToolUse)
tool_use_id: StringUnique identifier for this tool use (correlates with PreToolUseEvent)
tool_result: ValueResult returned by the tool - may contain “content” on success or “error” on failure
history: Vec<Value>Structured JSON snapshot including this tool call and its unmodified result.
Implementations§
Source§impl PostToolUseEvent
impl PostToolUseEvent
Sourcepub fn new(
tool_name: String,
tool_input: Value,
tool_use_id: String,
tool_result: Value,
history: Vec<Value>,
) -> Self
pub fn new( tool_name: String, tool_input: Value, tool_use_id: String, tool_result: Value, history: Vec<Value>, ) -> Self
Creates a new PostToolUseEvent.
This constructor is typically called by the agent runtime after tool execution, not by user code. Users receive instances of this struct in their hook handlers.
Trait Implementations§
Source§impl Clone for PostToolUseEvent
impl Clone for PostToolUseEvent
Auto Trait Implementations§
impl Freeze for PostToolUseEvent
impl RefUnwindSafe for PostToolUseEvent
impl Send for PostToolUseEvent
impl Sync for PostToolUseEvent
impl Unpin for PostToolUseEvent
impl UnsafeUnpin for PostToolUseEvent
impl UnwindSafe for PostToolUseEvent
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