pub struct ToolName(pub String);Expand description
Unique name identifying a Tool within a ToolRegistry.
Tool names are used as registry keys and appear in ToolRequests to
route calls to the correct implementation. Names are compared in a
case-sensitive, lexicographic order.
§Example
use agentkit_tools_core::ToolName;
let name = ToolName::new("file_read");
assert_eq!(name.to_string(), "file_read");
// Also converts from &str:
let name: ToolName = "shell_exec".into();Tuple Fields§
§0: StringImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolName
impl<'de> Deserialize<'de> for ToolName
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for ToolName
impl Ord for ToolName
Source§impl PartialOrd for ToolName
impl PartialOrd for ToolName
impl Eq for ToolName
impl StructuralPartialEq for ToolName
Auto Trait Implementations§
impl Freeze for ToolName
impl RefUnwindSafe for ToolName
impl Send for ToolName
impl Sync for ToolName
impl Unpin for ToolName
impl UnsafeUnpin for ToolName
impl UnwindSafe for ToolName
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more