I am writing a cli app with StructOpt crate. And I want to use two confilct options(-s and -i), that means user can just pass one option(-s or -i) at any one time. How can I write?
Thank you for your reply. I have tried that, but when I use -s option, it will be error with, error: The argument '--string <string>' cannot be used with '--input <input>'. I just want to use one of the -s and -i.
If I don't use default_value, when I use -s option, it will be panic with thread 'main' panicked at 'called Option::unwrap() on a None value', src/main.rs:4:10. And when I use -i option, it will be error with error: The following required arguments were not provided: --string <string>