pub trait NativeToolPort: Send + Sync {
// Required methods
fn list_tools(
&self,
) -> impl Future<Output = Result<Vec<ToolDescriptor>, ToolError>> + Send;
fn call_tool(
&self,
call: ToolCall,
) -> impl Future<Output = Result<ToolResult, ToolError>> + Send;
}Expand description
Native async tool port — implement this for the cleanest developer experience.
The framework provides a blanket implementation that bridges any
NativeToolPort to the dyn-compatible ToolPort.
Required Methods§
Sourcefn list_tools(
&self,
) -> impl Future<Output = Result<Vec<ToolDescriptor>, ToolError>> + Send
fn list_tools( &self, ) -> impl Future<Output = Result<Vec<ToolDescriptor>, ToolError>> + Send
List all available tools.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.