From 143014a91e695106d8383ed173c482b3b4519663 Mon Sep 17 00:00:00 2001 From: Keuin Date: Mon, 4 Sep 2023 01:57:22 +0800 Subject: initial version --- src/arguments.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/arguments.rs (limited to 'src/arguments.rs') diff --git a/src/arguments.rs b/src/arguments.rs new file mode 100644 index 0000000..5f3d8e2 --- /dev/null +++ b/src/arguments.rs @@ -0,0 +1,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, +} -- cgit v1.2.3