pub struct ToolAllowList {
pub allowed: Vec<String>,
}Expand description
Block every tool call whose tool is not in the list (PreToolUse hook).
use claude_code_agent::HookRegistry;
use claude_code_agent::middleware::ToolAllowList;
let mut hooks = HookRegistry::new();
ToolAllowList::new(["Read", "Grep", "Glob"]).install(&mut hooks);Fields§
§allowed: Vec<String>Names of the allowed tools.
Implementations§
Source§impl ToolAllowList
impl ToolAllowList
Trait Implementations§
Source§impl Clone for ToolAllowList
impl Clone for ToolAllowList
Auto Trait Implementations§
impl Forget for ToolAllowList
impl Freeze for ToolAllowList
impl Move for ToolAllowList
impl RefUnwindSafe for ToolAllowList
impl Send for ToolAllowList
impl Sync for ToolAllowList
impl Unpin for ToolAllowList
impl UnsafeUnpin for ToolAllowList
impl UnwindSafe for ToolAllowList
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