pub struct HookResult {
pub action: HookAction,
pub additional_context: Option<String>,
pub updated_input: Option<Value>,
pub system_message: Option<String>,
pub suppress_output: bool,
pub permission_decision: Option<PermissionDecision>,
pub permission_decision_reason: Option<String>,
}Expand description
Rich result returned by a hook dispatch, containing the primary action as well as optional structured metadata for the caller to consume.
Fields§
§action: HookActionPrimary decision.
additional_context: Option<String>Extra context to inject into the next LLM system prompt.
updated_input: Option<Value>Override tool arguments (meaningful only for PreToolCall).
system_message: Option<String>User-facing warning message.
suppress_output: boolWhen true, suppress the hook’s raw stdout from the transcript.
permission_decision: Option<PermissionDecision>Explicit permission decision (overrides normal permission check).
permission_decision_reason: Option<String>Reason for the permission decision (for audit logging).
Implementations§
Source§impl HookResult
impl HookResult
Sourcepub fn continue_default() -> Self
pub fn continue_default() -> Self
Shorthand for the default “do nothing” result.
Trait Implementations§
Source§impl Clone for HookResult
impl Clone for HookResult
Source§fn clone(&self) -> HookResult
fn clone(&self) -> HookResult
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 HookResult
impl Debug for HookResult
Auto Trait Implementations§
impl Freeze for HookResult
impl RefUnwindSafe for HookResult
impl Send for HookResult
impl Sync for HookResult
impl Unpin for HookResult
impl UnsafeUnpin for HookResult
impl UnwindSafe for HookResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more