mirror of
https://github.com/clap-rs/clap
synced 2024-12-15 15:22:30 +00:00
25 lines
473 B
Rust
25 lines
473 B
Rust
//! How to use `arg_enum!` with `StructOpt`.
|
|
// TODO: make it work
|
|
fn main() {}
|
|
// use clap::Clap;
|
|
|
|
// arg_enum! {
|
|
// #[derive(Debug)]
|
|
// enum Baz {
|
|
// Foo,
|
|
// Bar,
|
|
// FooBar
|
|
// }
|
|
// }
|
|
|
|
// #[derive(Clap, Debug)]
|
|
// struct Opt {
|
|
// /// Important argument.
|
|
// #[clap(possible_values = &Baz::variants(), case_insensitive = true)]
|
|
// i: Baz,
|
|
// }
|
|
|
|
// fn main() {
|
|
// let opt = Opt::parse();
|
|
// println!("{:?}", opt);
|
|
// }
|