| //! How to extract subcommands' args into external structs. |
| //! Running this example with --help prints this message: |
| //! ----------------------------------------------------- |
| //! enum_tuple <SUBCOMMAND> |
| //! -h, --help Prints help information |
| //! -V, --version Prints version information |
| //! help Prints this message or the help of the given subcommand(s) |
| //! ----------------------------------------------------- |
| use structopt::StructOpt; |
| #[derive(Debug, StructOpt)] |
| #[derive(Debug, StructOpt)] |
| #[structopt(name = "foo")] |
| #[derive(Debug, StructOpt)] |
| #[structopt(name = "classify")] |
| pub struct ApplicationArguments { |
| let opt = ApplicationArguments::from_args(); |