1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
use clap::{arg, Parser}; #[derive(Parser, Debug)] #[command(author, version, about, long_about = None)] pub struct Args { pub mode: Mode, /// The config file to use #[arg(short, long)] pub config: String, } #[derive(clap::ValueEnum, Clone, Debug)] pub enum Mode { SERVER, CLIENT, }