pub trait TypedTool {
type Input;
type Output;
// Required methods
fn name(&self) -> Cow<'static, str>;
fn description(&self) -> Cow<'static, str>;
fn input_schema(&self) -> Cow<'static, str>;
fn annotations(&self) -> ToolAnnotations;
fn execute(
&self,
arguments: Self::Input,
) -> impl Future<Output = Self::Output> + Send;
}
Required Associated Types§
Required Methods§
Sourcefn description(&self) -> Cow<'static, str>
fn description(&self) -> Cow<'static, str>
The description of the tool
Sourcefn input_schema(&self) -> Cow<'static, str>
fn input_schema(&self) -> Cow<'static, str>
The parameters of the tool
Sourcefn annotations(&self) -> ToolAnnotations
fn annotations(&self) -> ToolAnnotations
The annotations of the tool
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.