mirror of
https://github.com/clap-rs/clap
synced 2024-11-14 00:27:13 +00:00
28 lines
592 B
Rust
28 lines
592 B
Rust
// #[macro_use]
|
|
// extern crate clap;
|
|
|
|
// use clap::{App, Arg};
|
|
|
|
fn main() {}
|
|
|
|
// #[derive(ArgEnum, Debug)]
|
|
// enum ArgChoice {
|
|
// Foo,
|
|
// Bar,
|
|
// Baz,
|
|
// }
|
|
|
|
// fn main() {
|
|
// let matches = App::new(env!("CARGO_PKG_NAME"))
|
|
// .arg(
|
|
// Arg::with_name("arg")
|
|
// .required(true)
|
|
// .takes_value(true)
|
|
// .possible_values(&ArgChoice::variants()),
|
|
// )
|
|
// .get_matches();
|
|
|
|
// let t = value_t!(matches.value_of("arg"), ArgChoice).unwrap_or_else(|e| e.exit());
|
|
|
|
// println!("{:?}", t);
|
|
// }
|