pub enum SafeguardKind {
PlanningWorkflow,
CommandSecurity,
ToolPolicy,
PermissionReview,
SafetyValidation,
}Expand description
Which safeguard refused a tool call.
Producers that refuse a call return SafeguardDenial so the refusal is
recognized by type after it crosses an anyhow boundary. Matching words
like “policy” or “sandbox” in the message is only the fallback for refusals
from sources that do not carry a kind, and it misreads any error that merely
mentions a file called policy_facade.rs.
Variants§
PlanningWorkflow
A mutating or unavailable tool in the read-only Planning workflow.
CommandSecurity
The command-security validator rejected a command.
ToolPolicy
A tool deny policy or workspace boundary refused the call.
PermissionReview
Permission review refused the call.
SafetyValidation
The safety gateway’s validation failed.
Implementations§
Source§impl SafeguardKind
impl SafeguardKind
Sourcepub const fn category(self) -> ErrorCategory
pub const fn category(self) -> ErrorCategory
Error category recovery and presentation decisions key on.
Trait Implementations§
Source§impl Clone for SafeguardKind
impl Clone for SafeguardKind
impl Copy for SafeguardKind
Source§impl Debug for SafeguardKind
impl Debug for SafeguardKind
impl Eq for SafeguardKind
Source§impl Hash for SafeguardKind
impl Hash for SafeguardKind
Source§impl PartialEq for SafeguardKind
impl PartialEq for SafeguardKind
impl StructuralPartialEq for SafeguardKind
Auto Trait Implementations§
impl Forget for SafeguardKind
impl Freeze for SafeguardKind
impl Move for SafeguardKind
impl RefUnwindSafe for SafeguardKind
impl Send for SafeguardKind
impl Sync for SafeguardKind
impl Unpin for SafeguardKind
impl UnsafeUnpin for SafeguardKind
impl UnwindSafe for SafeguardKind
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.