chore(tool manager): Progress on adding tools

Going to try changing around the download manager to take a generic trait rather than specifically for game downloads

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2024-12-30 17:09:31 +11:00
parent 3ca5be6658
commit 20f726632e
7 changed files with 46 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
use std::path::PathBuf;
use super::external_component::ExternalComponent;
pub struct Tool {
name: String,
version: String,
location: Option<PathBuf>,
}
impl ExternalComponent for Tool {
fn download(&mut self) {
todo!()
}
fn version(&self) -> &String {
&self.version
}
fn is_installed(&self) -> bool {
self.location.is_some()
}
fn location(&self) -> &Option<PathBuf> {
&self.location
}
}