Skip to main content

StaticToolErased

Trait StaticToolErased 

Source
pub trait StaticToolErased: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn display_name(&self) -> &'static str;
    fn description(&self) -> &'static str;
    fn requires_approval(&self) -> bool;
    fn required_capabilities(&self) -> Capabilities;
    fn schema(&self) -> ToolSchema;
    fn execute_erased<'life0, 'life1, 'async_trait>(
        &'life0 self,
        params: Value,
        ctx: &'life1 StaticToolContext,
    ) -> Pin<Box<dyn Future<Output = Result<ToolResult, StaticToolError<ToolExecutionError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn name(&self) -> &'static str

Source

fn display_name(&self) -> &'static str

Source

fn description(&self) -> &'static str

Source

fn requires_approval(&self) -> bool

Source

fn required_capabilities(&self) -> Capabilities

Source

fn schema(&self) -> ToolSchema

Source

fn execute_erased<'life0, 'life1, 'async_trait>( &'life0 self, params: Value, ctx: &'life1 StaticToolContext, ) -> Pin<Box<dyn Future<Output = Result<ToolResult, StaticToolError<ToolExecutionError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§

Source§

impl<T> StaticToolErased for T
where T: StaticTool,