Trait proto_core::Installable
source · pub trait Installable<'tool>: Send + Sync + Describable<'tool> {
// Required method
fn get_install_dir(&self) -> Result<PathBuf, ProtoError>;
// Provided methods
fn get_archive_prefix(&self) -> Result<Option<String>, ProtoError> { ... }
fn install<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
install_dir: &'life1 Path,
download_path: &'life2 Path
) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn uninstall<'life0, 'life1, 'async_trait>(
&'life0 self,
install_dir: &'life1 Path
) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}
Required Methods§
sourcefn get_install_dir(&self) -> Result<PathBuf, ProtoError>
fn get_install_dir(&self) -> Result<PathBuf, ProtoError>
Return an absolute file path to the directory containing the installed tool.
This is typically ~/.proto/tools/
Provided Methods§
sourcefn get_archive_prefix(&self) -> Result<Option<String>, ProtoError>
fn get_archive_prefix(&self) -> Result<Option<String>, ProtoError>
Return a prefix that will be removed from all paths when unpacking an archive and copying the files.
sourcefn install<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
install_dir: &'life1 Path,
download_path: &'life2 Path
) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn install<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, install_dir: &'life1 Path, download_path: &'life2 Path ) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Run any installation steps after downloading and verifying the tool. This is typically unzipping an archive, and running any installers/binaries.