use clap::{ Args, Subcommand }; use crate::cli::{ Exit, Command }; /// Manage the ELF symbol index. #[derive(Debug, Args)] pub struct Cache { #[command(subcommand)] pub action: CacheAction, } #[derive(Debug, Subcommand)] pub enum CacheAction { Prune(Prune), } impl CacheAction { pub fn command(&self) -> &dyn Command { match self { Self::Prune(c) => c, } } } impl Command for Cache { fn run(&self) -> anyhow::Result { self.action.command().run() } fn on_error(&self) -> Exit { self.action.command().on_error() } } /// Drop index entries for package versions that are no longer installed. #[derive(Debug, Args)] pub struct Prune; impl Command for Prune { fn run(&self) -> anyhow::Result { todo!("keel cache prune") } }