pub enum GuardAction {
Allow,
Deny {
reason: String,
},
Warn {
reason: String,
},
Kill {
reason: String,
},
}Expand description
Action returned by guardrail hooks that can deny operations.
Variants§
Allow
Allow the operation to proceed.
Deny
Deny the operation with a reason.
Warn
Log the concern but allow the operation to proceed.
The agent loop treats Warn like Allow but emits
AgentEvent::GuardrailWarned and an audit record. This enables
monitoring mode (shadow enforcement) without blocking production.
Kill
Immediately terminate the agent run. Used for critical detections
(e.g., CSAM, active exploitation) where the agent loop must stop
without further processing. The agent emits KillSwitchActivated
and returns Error::KillSwitch.
Implementations§
Trait Implementations§
Source§impl Clone for GuardAction
impl Clone for GuardAction
Source§fn clone(&self) -> GuardAction
fn clone(&self) -> GuardAction
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 GuardAction
impl Debug for GuardAction
Source§impl PartialEq for GuardAction
impl PartialEq for GuardAction
Source§fn eq(&self, other: &GuardAction) -> bool
fn eq(&self, other: &GuardAction) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GuardAction
Auto Trait Implementations§
impl Freeze for GuardAction
impl RefUnwindSafe for GuardAction
impl Send for GuardAction
impl Sync for GuardAction
impl Unpin for GuardAction
impl UnsafeUnpin for GuardAction
impl UnwindSafe for GuardAction
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