pub trait Tool: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn is_installed(&self) -> Result<bool>;
fn get_version(&self) -> Result<Option<String>>;
fn get_executable_path(&self, version: &str, install_dir: &Path) -> PathBuf;
fn execute(&self, args: &[String]) -> Result<i32>;
// Provided methods
fn description(&self) -> &str { ... }
fn homepage(&self) -> Option<&str> { ... }
fn supports_auto_install(&self) -> bool { ... }
fn get_info(&self) -> ToolInfo { ... }
}Expand description
Synchronous tool interface for compatibility with legacy code This trait provides a synchronous interface for tools that don’t need async operations
Required Methods§
Sourcefn is_installed(&self) -> Result<bool>
fn is_installed(&self) -> Result<bool>
Check if the tool is installed on the system
Sourcefn get_version(&self) -> Result<Option<String>>
fn get_version(&self) -> Result<Option<String>>
Get the currently installed version (if any)
Sourcefn get_executable_path(&self, version: &str, install_dir: &Path) -> PathBuf
fn get_executable_path(&self, version: &str, install_dir: &Path) -> PathBuf
Get the expected executable path for a given version
Provided Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Get tool description
Sourcefn supports_auto_install(&self) -> bool
fn supports_auto_install(&self) -> bool
Check if tool supports auto-installation