pub enum GuardVerdict {
Allow,
Warn(String),
Block(String),
CircuitBreak(String),
}Expand description
Graduated response level from the guard.
Variants§
Allow
Normal operation, proceed.
Warn(String)
Allowed but suspicious — a warning has been logged.
Block(String)
This specific call is blocked. The message explains why. The loop should skip this tool call and insert an error result.
CircuitBreak(String)
The entire loop must terminate. The message explains why.
Implementations§
Source§impl GuardVerdict
impl GuardVerdict
Sourcepub fn is_allowed(&self) -> bool
pub fn is_allowed(&self) -> bool
Whether the verdict allows continuing (Allow or Warn).
Sourcepub fn is_circuit_break(&self) -> bool
pub fn is_circuit_break(&self) -> bool
Whether the verdict requires terminating the loop.
Trait Implementations§
Source§impl Clone for GuardVerdict
impl Clone for GuardVerdict
Source§fn clone(&self) -> GuardVerdict
fn clone(&self) -> GuardVerdict
Returns a duplicate of the value. Read more
1.0.0 · 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 GuardVerdict
impl Debug for GuardVerdict
Source§impl PartialEq for GuardVerdict
impl PartialEq for GuardVerdict
impl Eq for GuardVerdict
impl StructuralPartialEq for GuardVerdict
Auto Trait Implementations§
impl Freeze for GuardVerdict
impl RefUnwindSafe for GuardVerdict
impl Send for GuardVerdict
impl Sync for GuardVerdict
impl Unpin for GuardVerdict
impl UnsafeUnpin for GuardVerdict
impl UnwindSafe for GuardVerdict
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.