Skip to main content

Tool

Trait Tool 

Source
pub trait Tool: 'static {
    // Required method
    fn definition() -> ToolDef;
}
Expand description

A tool that can be registered with ServerBuilder::tool.

Required Methods§

Source

fn definition() -> ToolDef

Builds the tool definition. Called once, at registration.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§