Skip to main content

ModeNativeToolsPlugin

Trait ModeNativeToolsPlugin 

Source
pub trait ModeNativeToolsPlugin: Send + Sync {
    // Required methods
    fn tool_manifests(&self) -> Vec<ToolManifest>;
    fn resolve_contract(&self, name: &str) -> Option<Arc<ToolContract>>;
    fn execute<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        context: &'life1 ToolDispatchContext,
        name: &'life2 str,
        args: &'life3 Value,
        progress: Option<&'life4 ProgressSender>,
    ) -> Pin<Box<dyn Future<Output = Option<ToolResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait;

    // Provided method
    fn resolve_manifest(&self, name: &str) -> Option<ToolManifest> { ... }
}

Required Methods§

Source

fn tool_manifests(&self) -> Vec<ToolManifest>

Source

fn resolve_contract(&self, name: &str) -> Option<Arc<ToolContract>>

Source

fn execute<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, context: &'life1 ToolDispatchContext, name: &'life2 str, args: &'life3 Value, progress: Option<&'life4 ProgressSender>, ) -> Pin<Box<dyn Future<Output = Option<ToolResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Provided Methods§

Implementors§