pub trait ApprovalProvider<Ctx: Send + Sync>: Send + Sync {
// Required method
fn check_approval<'life0, 'life1, 'life2, 'async_trait>(
ctx: &'life0 Ctx,
tool_name: &'life1 str,
description: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Provider trait for approval/permission checks.
Moves the traditional Self type to an explicit Ctx parameter so that
multiple overlapping implementations can coexist (e.g., prompt-based,
auto-approve, session-cached).
Required Methods§
Sourcefn check_approval<'life0, 'life1, 'life2, 'async_trait>(
ctx: &'life0 Ctx,
tool_name: &'life1 str,
description: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn check_approval<'life0, 'life1, 'life2, 'async_trait>(
ctx: &'life0 Ctx,
tool_name: &'life1 str,
description: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Check whether the operation described by description is approved
in the given context.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".