1 use clap::Parser; 2 3 #[derive(Parser, Debug)] 4 #[command(name = "basic")] 5 struct Opt { 6 #[arg(short, value_enum, default_value_t)] 7 opts: bool, 8 } 9 main()10 fn main() { 11 let opt = Opt::parse(); 12 println!("{:?}", opt); 13 } 14