pub trait ToolAdmission: Send + Sync {
// Required method
fn approve(&self, req: &ToolRequest) -> Verdict;
// Provided method
fn settle(&self, _req: &ToolRequest, _ok: bool, _error_code: Option<&str>) { ... }
}Expand description
The caller-supplied pre-effect hook (CodeRight EFF-001: validate, approve,
execute, settle). approve runs after the toolbox’s own validation and
before the tool does anything; a denial executes nothing.
Required Methods§
fn approve(&self, req: &ToolRequest) -> Verdict
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".