Files
drop/desktop/src-tauri/src/tools/tool.rs
T
quexeky 20f726632e 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>
2025-01-05 18:49:32 +11:00

26 lines
467 B
Rust

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
}
}