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 { ... }
}