pub struct ToolRule {
pub name: String,
pub allow: bool,
pub requires_approval_if: Option<String>,
}Expand description
A single tool rule from the policy tools: map.
Only the fields needed for cross-layer lowering + L7 evaluation are kept on
the canonical AST. requires_approval_if is preserved verbatim so the
eBPF lowering can extract the path starts_with "…" predicates that map to
in-kernel PathPattern deny rules.
Fields§
§name: StringTool name (map key), e.g. write_file or the * wildcard.
allow: boolWhether the tool is permitted.
requires_approval_if: Option<String>Raw CEL-ish requires_approval_if expression, if present.
Trait Implementations§
impl Eq for ToolRule
impl StructuralPartialEq for ToolRule
Auto Trait Implementations§
impl Freeze for ToolRule
impl RefUnwindSafe for ToolRule
impl Send for ToolRule
impl Sync for ToolRule
impl Unpin for ToolRule
impl UnsafeUnpin for ToolRule
impl UnwindSafe for ToolRule
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