Skip to main content

tycode_core/tools/
mod.rs

1pub mod ask_user_question;
2pub mod fuzzy_json;
3pub mod registry;
4pub mod r#trait;
5
6#[derive(Clone, PartialEq, Eq, Hash, Debug, PartialOrd, Ord)]
7pub struct ToolName(String);
8
9impl ToolName {
10    pub fn new(name: impl Into<String>) -> Self {
11        Self(name.into())
12    }
13
14    pub fn as_str(&self) -> &str {
15        &self.0
16    }
17}
18
19impl std::fmt::Display for ToolName {
20    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21        write!(f, "{}", self.0)
22    }
23}