summaryrefslogblamecommitdiff
path: root/src/packages.rs
blob: 7ac1736e1e3028763da9d8c87cf14234dfae3b9d (plain) (tree)
1
2
3
4
5
6

                                    

                         
               
                








                                        
                                                    


                                          
use serde::{Deserialize, Serialize};

use crate::error::Result;

pub mod pacman;
pub mod portage;

#[derive(Debug, Serialize, Deserialize)]
pub struct Package {
    pub id: String,
    pub version: String,
    pub explicit: bool
}

pub trait PackageManager {
    fn get_installed(&self) -> Result<Vec<Package>>;

    fn install(&self, pkgs: Vec<Package>);
}