pub trait ToolName:
Send
+ Sync
+ Serialize
+ DeserializeOwned
+ 'static { }Expand description
Marker trait for tool names.
Tool names must be serializable (for storage/logging) and deserializable (for parsing from LLM responses). The string representation is derived from serde serialization.
§Example
ⓘ
#[derive(Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum MyToolName {
Read,
Write,
}
impl ToolName for MyToolName {}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.