pub enum HookDecision {
Allow,
Deny {
reason: String,
},
}Expand description
Allow-or-deny verdict parsed from a hook’s stdout / exit status.
Failure semantics are asymmetric by design: INTENT fails closed (an
explicit deny — JSON or exit code 2 — always denies), while INFRASTRUCTURE
fails open (a parse error, timeout, or spawn failure counts as Allow
with a warning). Hooks are user-installed, disabled-by-default code layered
on top of the policy gate — a buggy hook must not lock the user out of
every tool call.
Variants§
Trait Implementations§
Source§impl Clone for HookDecision
impl Clone for HookDecision
Source§fn clone(&self) -> HookDecision
fn clone(&self) -> HookDecision
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 HookDecision
impl Debug for HookDecision
Source§impl Default for HookDecision
impl Default for HookDecision
Source§fn default() -> HookDecision
fn default() -> HookDecision
Returns the “default value” for a type. Read more
impl Eq for HookDecision
Source§impl PartialEq for HookDecision
impl PartialEq for HookDecision
impl StructuralPartialEq for HookDecision
Auto Trait Implementations§
impl Freeze for HookDecision
impl RefUnwindSafe for HookDecision
impl Send for HookDecision
impl Sync for HookDecision
impl Unpin for HookDecision
impl UnsafeUnpin for HookDecision
impl UnwindSafe for HookDecision
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