pub struct ToolAskRule {
pub tool: String,
pub command: Option<String>,
pub path: Option<String>,
}Expand description
Typed rule that marks a tool invocation as requiring approval.
This foundation is intentionally ask-only. Existing trusted/denied command
prefix behavior is preserved while typed ask records can make
AskForApproval::Never reject invocations that cannot be approved.
Fields§
§tool: StringName of the tool this rule applies to (e.g. "exec_shell", "edit_file").
command: Option<String>Optional command prefix to match against (uses arity-aware matching).
path: Option<String>Optional file path pattern to match against.
Implementations§
Trait Implementations§
Source§impl Clone for ToolAskRule
impl Clone for ToolAskRule
Source§fn clone(&self) -> ToolAskRule
fn clone(&self) -> ToolAskRule
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 ToolAskRule
impl Debug for ToolAskRule
Source§impl<'de> Deserialize<'de> for ToolAskRule
impl<'de> Deserialize<'de> for ToolAskRule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ToolAskRule
Source§impl PartialEq for ToolAskRule
impl PartialEq for ToolAskRule
Source§fn eq(&self, other: &ToolAskRule) -> bool
fn eq(&self, other: &ToolAskRule) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ToolAskRule
impl Serialize for ToolAskRule
impl StructuralPartialEq for ToolAskRule
Auto Trait Implementations§
impl Freeze for ToolAskRule
impl RefUnwindSafe for ToolAskRule
impl Send for ToolAskRule
impl Sync for ToolAskRule
impl Unpin for ToolAskRule
impl UnsafeUnpin for ToolAskRule
impl UnwindSafe for ToolAskRule
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