rapid_cli/commands/mod.rs
1pub mod init;
2pub mod new;
3pub mod run;
4pub mod templates;
5pub mod routes;
6use crate::cli::{CliError, Config};
7use clap::Command;
8
9// Super basic trait for defining what rapid commands should be composed of
10pub trait RapidCommand {
11 // (1) - Each rapid command must return a clap sub-command with proper config
12 fn cmd() -> Command;
13 // (2) - All rapid cli commands will have a execute function that they act on
14 fn execute(_: &Config, _: &clap::ArgMatches) -> Result<(), CliError<'static>>;
15 // TODO: add some kind of "help" thing here for each --help arg on every rapid command
16}