pub trait CanUseTool: Send + Sync {
// Required method
fn can_use_tool<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tool_name: &'life1 str,
input: &'life2 Value,
context: &'life3 ToolPermissionContext,
) -> Pin<Box<dyn Future<Output = PermissionResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
Tool permission callback trait
Required Methods§
Sourcefn can_use_tool<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tool_name: &'life1 str,
input: &'life2 Value,
context: &'life3 ToolPermissionContext,
) -> Pin<Box<dyn Future<Output = PermissionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn can_use_tool<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tool_name: &'life1 str,
input: &'life2 Value,
context: &'life3 ToolPermissionContext,
) -> Pin<Box<dyn Future<Output = PermissionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Check if a tool can be used