1 //! How to require presence of at least N values,
2 //! like `val1 val2 ... valN ... valM`.
3 
4 use structopt::StructOpt;
5 
6 #[derive(StructOpt, Debug)]
7 struct Opt {
8     #[structopt(required = true, min_values = 2)]
9     foos: Vec<String>,
10 }
11 
main()12 fn main() {
13     let opt = Opt::from_args();
14     println!("{:?}", opt);
15 }
16