StructureTool

Trait StructureTool 

Source
pub trait StructureTool: Send + Sync {
    type Input: for<'a> Deserialize<'a> + JsonSchema + Send + Sync;
    type Output: Serialize;

    // Required method
    fn run_with_args<'life0, 'async_trait>(
        &'life0 self,
        input: Self::Input,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Output, ToolError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn name(&self) -> &str { ... }
    fn version(&self) -> &str { ... }
    fn description(&self) -> &str { ... }
    fn author(&self) -> &str { ... }
    fn schema(&self) -> RootSchema { ... }
    fn definition(&self) -> ToolDefinition { ... }
    fn run<'life0, 'life1, 'async_trait>(
        &'life0 self,
        input: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Required Associated Types§

Required Methods§

Source

fn run_with_args<'life0, 'async_trait>( &'life0 self, input: Self::Input, ) -> Pin<Box<dyn Future<Output = Result<Self::Output, ToolError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn name(&self) -> &str

Source

fn version(&self) -> &str

Source

fn description(&self) -> &str

Source

fn author(&self) -> &str

Source

fn schema(&self) -> RootSchema

Source

fn definition(&self) -> ToolDefinition

Source

fn run<'life0, 'life1, 'async_trait>( &'life0 self, input: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§