blob: b94f783d7bdb9728b6a07b1c7111b0a62af880aa [file] [log] [blame]
Matthew Maurer32e76692020-06-02 11:15:15 -07001// Copyright 2018 Guillaume Pinot (@TeXitoi) <texitoi@texitoi.eu>
2//
3// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6// option. This file may not be copied, modified, or distributed
7// except according to those terms.
8
9use structopt::StructOpt;
10
11#[derive(StructOpt, Debug)]
12struct Opt {
13 #[structopt(raw(case_insensitive = "true"))]
14 s: String,
15}
16
17#[derive(StructOpt, Debug)]
18struct Opt2 {
19 #[structopt(raw(requires_if = r#""one", "two""#))]
20 s: String,
21}
22fn main() {
23 let opt = Opt::from_args();
24 println!("{:?}", opt);
25}