pub enum GateDecision {
Allowed,
Blocked {
taint_level: TaintLevel,
clearance: TaintLevel,
source_regions: Vec<String>,
tool_name: String,
},
}Expand description
Result of a gate check - whether a tool invocation is allowed.
Variants§
Allowed
Taint level is within clearance - proceed.
Blocked
Taint level exceeds clearance - gate fires.
Fields
§
taint_level: TaintLevelThe taint level that caused the block.
§
clearance: TaintLevelThe tool’s clearance level.
Implementations§
Source§impl GateDecision
impl GateDecision
Sourcepub fn is_allowed(&self) -> bool
pub fn is_allowed(&self) -> bool
Returns true if the gate allows the action.
Sourcepub fn blocked_levels(&self) -> Option<(TaintLevel, TaintLevel)>
pub fn blocked_levels(&self) -> Option<(TaintLevel, TaintLevel)>
For a Blocked decision, the (taint_level, clearance) that caused the
block; None for Allowed.
Trait Implementations§
Source§impl Clone for GateDecision
impl Clone for GateDecision
Source§fn clone(&self) -> GateDecision
fn clone(&self) -> GateDecision
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 GateDecision
impl Debug for GateDecision
impl Eq for GateDecision
Source§impl PartialEq for GateDecision
impl PartialEq for GateDecision
impl StructuralPartialEq for GateDecision
Auto Trait Implementations§
impl Freeze for GateDecision
impl RefUnwindSafe for GateDecision
impl Send for GateDecision
impl Sync for GateDecision
impl Unpin for GateDecision
impl UnsafeUnpin for GateDecision
impl UnwindSafe for GateDecision
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.