Closed vincenzopalazzo closed 1 year ago
We should be able to parse this kind of enum
pub enum CoffeeCommand { /// Install a single by name. #[clap(arg_required_else_help = true)] Install { plugin: String, #[arg(short, long, action = clap::ArgAction::SetTrue)] verbose: bool, #[arg(short, long, action = clap::ArgAction::SetTrue)] dynamic: bool, }, /// upgrade a single repository. #[clap(arg_required_else_help = true)] Upgrade { repo: String }, /// Print the list of plugins installed in cln. #[clap(arg_required_else_help = false)] List {}, /// Remove a plugin installed in cln. #[clap(arg_required_else_help = true)] Remove { plugin: String }, /// Manage Repository subcommand #[clap(arg_required_else_help = true)] Remote { #[clap(subcommand)] action: RemoteAction, }, /// Configure coffee with the core lightning /// configuration #[clap(arg_required_else_help = true)] Setup { cln_conf: String }, /// show the README file of the plugin #[clap(arg_required_else_help = true)] Show { plugin: String }, /// clean up remote repositories storage information #[clap(arg_required_else_help = false)] Nurse {}, }
This introduce a good summary of what we should support at minimum
enum Message { Quit, Move { x: i32, y: i32 }, Write(String), ChangeColor(i32, i32, i32), }
We should be able to parse this kind of enum
This introduce a good summary of what we should support at minimum