pub trait AsyncTool: Send + Sync {
Show 13 methods
// Required methods
fn name(&self) -> &str;
fn fetch_versions<'life0, 'async_trait>(
&'life0 self,
include_prerelease: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<VersionInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn install_version<'life0, 'life1, 'async_trait>(
&'life0 self,
version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<PathBuf>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_installed_versions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn uninstall_version<'life0, 'life1, 'async_trait>(
&'life0 self,
version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_download_url<'life0, 'life1, 'async_trait>(
&'life0 self,
version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_executable_path(&self, version: &str) -> PathBuf;
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<i32>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn description(&self) -> &str { ... }
fn aliases(&self) -> Vec<&str> { ... }
fn is_version_installed<'life0, 'life1, 'async_trait>(
&'life0 self,
version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn get_base_install_dir(&self) -> PathBuf { ... }
fn get_version_install_dir(&self, version: &str) -> PathBuf { ... }
}Expand description
Core async tool interface - all tools are environment-isolated with version control
Required Methods§
Sourcefn fetch_versions<'life0, 'async_trait>(
&'life0 self,
include_prerelease: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<VersionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_versions<'life0, 'async_trait>(
&'life0 self,
include_prerelease: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<VersionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch available versions from the tool’s official source
Sourcefn install_version<'life0, 'life1, 'async_trait>(
&'life0 self,
version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<PathBuf>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn install_version<'life0, 'life1, 'async_trait>(
&'life0 self,
version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<PathBuf>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Install a specific version of the tool
Sourcefn get_installed_versions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_installed_versions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get all installed versions
Sourcefn uninstall_version<'life0, 'life1, 'async_trait>(
&'life0 self,
version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn uninstall_version<'life0, 'life1, 'async_trait>(
&'life0 self,
version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Uninstall a specific version
Sourcefn get_download_url<'life0, 'life1, 'async_trait>(
&'life0 self,
version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_download_url<'life0, 'life1, 'async_trait>(
&'life0 self,
version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get download URL for a specific version
Sourcefn get_executable_path(&self, version: &str) -> PathBuf
fn get_executable_path(&self, version: &str) -> PathBuf
Get the executable path for a specific version (vx-managed, environment-isolated)
Provided Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Get tool description
Sourcefn is_version_installed<'life0, 'life1, 'async_trait>(
&'life0 self,
version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_version_installed<'life0, 'life1, 'async_trait>(
&'life0 self,
version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if a specific version is installed
Sourcefn get_base_install_dir(&self) -> PathBuf
fn get_base_install_dir(&self) -> PathBuf
Get the base installation directory for this tool
Sourcefn get_version_install_dir(&self, version: &str) -> PathBuf
fn get_version_install_dir(&self, version: &str) -> PathBuf
Get installation directory for a specific version