Lines Matching refs:Opt
27 struct Opt {
32 Opt {
35 Opt::try_parse_from(["test", "42"]).unwrap()
37 assert!(Opt::try_parse_from(["test"]).is_err());
38 assert!(Opt::try_parse_from(["test", "42", "24"]).is_err());
51 struct Opt {
58 Opt::try_parse_from(["test", "42", "43"]).unwrap();
77 enum Opt {
89 Opt::Fetch {
93 Opt::try_parse_from(["test", "fetch", "42"]).unwrap()
96 Opt::Add(Add {
100 Opt::try_parse_from(["test", "add", "-i", "43"]).unwrap()
112 struct Opt {
117 let mut opt = Opt {
121 assert_eq!(Opt::try_parse_from(["test", "42"]).unwrap(), opt);
123 let mut opt = Opt {
127 assert_eq!(Opt::try_parse_from(["test", "52"]).unwrap(), opt);
148 enum Opt {
157 Opt::BaseCli(BaseCli::Command1(Command1 { arg1: 42, arg2: 44 })),
158 Opt::try_parse_from(["test", "command1", "42", "44"]).unwrap()
161 Opt::Command2(Command2 { arg2: 43 }),
162 Opt::try_parse_from(["test", "command2", "43"]).unwrap()
168 let mut opt = Opt::BaseCli(BaseCli::Command1(Command1 { arg1: 12, arg2: 14 }));
172 Opt::try_parse_from(["test", "command1", "42", "44"]).unwrap(),
176 let mut opt = Opt::BaseCli(BaseCli::Command1(Command1 { arg1: 12, arg2: 14 }));
179 Opt::try_parse_from(["test", "command1", "42", "14"]).unwrap(),
183 let mut opt = Opt::BaseCli(BaseCli::Command1(Command1 { arg1: 12, arg2: 14 }));
186 Opt::try_parse_from(["test", "command2", "43"]).unwrap(),
200 struct Opt {
207 Opt {
210 Opt::try_parse_from(["test", "42"]).unwrap()
213 let help = utils::get_help::<Opt>();
262 struct Opt {
276 assert_eq!(Opt { source: None }, Opt::try_parse_from(["test"]).unwrap());
278 Opt {
285 Opt::try_parse_from(["test", "serde"]).unwrap()
288 Opt {
295 Opt::try_parse_from(["test", "--path=./"]).unwrap()