1pub use clap; 2use clap::{App, ArgMatches}; 3 4pub trait CommandBase { 5 type Response; 6 type Error; 7 8 const NAME: &'static str; 9 fn subcommand<'a, 'b>() -> App<'a, 'b>; 10 fn run(args: &ArgMatches) -> Result<Self::Response, Self::Error>; 11}