pub trait Guard: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn evaluate(
&self,
ctx: &GuardContext<'_>,
) -> Result<GuardDecision, KernelError>;
}Required Methods§
Sourcefn evaluate(&self, ctx: &GuardContext<'_>) -> Result<GuardDecision, KernelError>
fn evaluate(&self, ctx: &GuardContext<'_>) -> Result<GuardDecision, KernelError>
Evaluate the guard against a tool call request.
Returns an allow or deny decision with optional evidence, or Err on
internal failure (which the kernel treats as deny).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".