35 lines
628 B
Rust
35 lines
628 B
Rust
|
use std::collections::HashMap;
|
||
|
|
||
|
use serde::{Deserialize, Serialize};
|
||
|
|
||
|
mod pm;
|
||
|
|
||
|
#[derive(Debug, Serialize, Deserialize)]
|
||
|
pub struct Package {
|
||
|
name: String,
|
||
|
}
|
||
|
|
||
|
impl Package {
|
||
|
pub fn install(&self) {
|
||
|
todo!()
|
||
|
}
|
||
|
|
||
|
pub fn uninstall(&self) {
|
||
|
todo!()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#[derive(Debug, Serialize, Deserialize)]
|
||
|
pub struct CrateAction {
|
||
|
pub name: String,
|
||
|
pub command: String,
|
||
|
pub args: Vec<String>,
|
||
|
}
|
||
|
|
||
|
#[derive(Debug, Serialize, Deserialize)]
|
||
|
pub struct Crate {
|
||
|
pub pkgs: HashMap<String, Package>,
|
||
|
pub actions: HashMap<String, CrateAction>,
|
||
|
pub super_actions: HashMap<String, CrateAction>,
|
||
|
}
|