pub struct PermissionChain {
pub exclude_tools: Vec<String>,
pub allowed_tools: Vec<String>,
pub mode: PermissionMode,
}Expand description
Priority chain for permission handling Order: exclude_tools/deny > ask > plan > yolo > allowed_tools/allow > can_use_tool > default behavior
Fields§
§exclude_tools: Vec<String>§allowed_tools: Vec<String>§mode: PermissionModeImplementations§
Source§impl PermissionChain
impl PermissionChain
pub fn new( exclude_tools: Vec<String>, allowed_tools: Vec<String>, mode: PermissionMode, ) -> Self
Sourcepub fn is_excluded(&self, tool_name: &str) -> bool
pub fn is_excluded(&self, tool_name: &str) -> bool
Check if a tool is excluded
Sourcepub fn is_explicitly_allowed(&self, tool_name: &str) -> bool
pub fn is_explicitly_allowed(&self, tool_name: &str) -> bool
Check if a tool is explicitly allowed
Sourcepub fn should_auto_execute(&self, tool_name: &str) -> bool
pub fn should_auto_execute(&self, tool_name: &str) -> bool
Check if tool should auto-execute based on mode
Trait Implementations§
Source§impl Clone for PermissionChain
impl Clone for PermissionChain
Source§fn clone(&self) -> PermissionChain
fn clone(&self) -> PermissionChain
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 moreAuto Trait Implementations§
impl Freeze for PermissionChain
impl RefUnwindSafe for PermissionChain
impl Send for PermissionChain
impl Sync for PermissionChain
impl Unpin for PermissionChain
impl UnsafeUnpin for PermissionChain
impl UnwindSafe for PermissionChain
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