pub struct HookOutcome {
pub block: bool,
pub reason: Option<String>,
pub override_content: Option<String>,
}Expand description
Outcome of a hook invocation.
block corresponds to exit code 2. The semantic of “block” depends on
the event:
- PreToolUse → block the tool call (
BeforeToolCallResult { block: true }) - Stop → block the stop (agent continues running)
- Other events → block has no effect (notification only)
Fields§
§block: boolExit code 2 from a script → true. See struct doc for semantics.
reason: Option<String>Human-readable reason (maps to reason in BeforeToolCallResult).
override_content: Option<String>PostToolUse only: override the tool’s result content.
Trait Implementations§
Source§impl Clone for HookOutcome
impl Clone for HookOutcome
Source§fn clone(&self) -> HookOutcome
fn clone(&self) -> HookOutcome
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 HookOutcome
impl Debug for HookOutcome
Source§impl Default for HookOutcome
impl Default for HookOutcome
Source§fn default() -> HookOutcome
fn default() -> HookOutcome
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HookOutcome
impl RefUnwindSafe for HookOutcome
impl Send for HookOutcome
impl Sync for HookOutcome
impl Unpin for HookOutcome
impl UnsafeUnpin for HookOutcome
impl UnwindSafe for HookOutcome
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