1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
//! All subcommands in leetcode-cli //! //! ```sh //! SUBCOMMANDS: //! help Prints this message or the help of the given subcommand(s) //! list List problems //! ``` use clap::{App, ArgMatches}; /// Abstract commands' traits. pub trait Command { /// Usage of the spefic command fn usage<'a, 'c>() -> App<'a, 'c>; /// The handler will deal [args, options,...] from the command-line fn handler(m: &ArgMatches); } mod list; mod stat; mod cache; pub use cache::CacheCommand; pub use list::ListCommand; pub use stat::StatCommand;