Home
last modified time | relevance | path

Searched refs:structopt (Results 1 – 25 of 127) sorted by relevance

123456

/external/rust/crates/structopt/tests/
Dskip.rs9 use structopt::StructOpt;
15 #[structopt(short)] in skip_1()
17 #[structopt(skip)] in skip_1()
35 #[structopt(short)] in skip_2()
37 #[structopt(skip)] in skip_2()
39 #[structopt(skip)] in skip_2()
42 #[structopt(skip)] in skip_2()
77 #[structopt(long, short)] in skip_enum()
79 #[structopt(skip)] in skip_enum()
81 #[structopt(skip)] in skip_enum()
[all …]
Dargument_naming.rs1 use structopt::StructOpt;
34 #[structopt(long)] in test_standalone_long_generates_kebab_case()
48 #[structopt(long = "foo")] in test_custom_long_overwrites_default_name()
62 #[structopt(name = "foo", long)] in test_standalone_long_uses_previous_defined_custom_name()
76 #[structopt(long, name = "foo")] in test_standalone_long_ignores_afterwards_defined_custom_name()
91 #[structopt(short)] in test_standalone_short_generates_kebab_case()
105 #[structopt(short = "o")] in test_custom_short_overwrites_default_name()
119 #[structopt(name = "option", short)] in test_standalone_short_uses_previous_defined_custom_name()
133 #[structopt(short, name = "option")] in test_standalone_short_ignores_afterwards_defined_custom_name()
147 #[structopt(rename_all = "screaming_snake", long)] in test_standalone_long_uses_previous_defined_casing()
[all …]
Ddoc-comments-help.rs11 use structopt::StructOpt;
21 #[structopt(short, long)] in doc_comments()
34 #[structopt(name = "lorem-ipsum", about = "Dolor sit amet")] in help_is_better_than_comments()
37 #[structopt(short, long, help = "DO NOT PASS A BAR UNDER ANY CIRCUMSTANCES")] in help_is_better_than_comments()
53 #[structopt(name = "lorem-ipsum", no_version)] in empty_line_in_doc_comment_is_double_linefeed()
64 #[structopt(name = "lorem-ipsum", about = "Dolor sit amet")] in field_long_doc_comment_both_help_long_help()
69 #[structopt(long)] in field_long_doc_comment_both_help_long_help()
73 #[structopt(long)] in field_long_doc_comment_both_help_long_help()
92 #[structopt(name = "lorem-ipsum", about = "Dolor sit amet")] in top_long_doc_comment_both_help_long_help()
94 #[structopt(subcommand)] in top_long_doc_comment_both_help_long_help()
[all …]
Dcustom-string-parsers.rs9 use structopt::StructOpt;
17 #[structopt(short, long, parse(from_os_str))]
20 #[structopt(short, default_value = "../", parse(from_os_str))]
23 #[structopt(short, parse(from_os_str))]
26 #[structopt(short, parse(from_os_str))]
29 #[structopt(short = "q", parse(from_os_str))]
60 #[structopt(short, parse(try_from_str = parse_hex))]
97 #[structopt(short, parse(from_str = custom_parser_1))]
99 #[structopt(short, parse(try_from_str = custom_parser_2))]
101 #[structopt(short, parse(from_os_str = custom_parser_3))]
[all …]
Dissues.rs6 use structopt::StructOpt;
10 use structopt::{clap::ArgGroup, StructOpt}; in issue_151()
13 #[structopt(group = ArgGroup::with_name("verb").required(true).multiple(true))] in issue_151()
15 #[structopt(long, group = "verb")] in issue_151()
17 #[structopt(long, group = "verb")] in issue_151()
23 #[structopt(flatten)] in issue_151()
44 use structopt::{clap::AppSettings, StructOpt}; in issue_289()
47 #[structopt(setting = AppSettings::InferSubcommands)] in issue_289()
54 #[structopt(setting = AppSettings::InferSubcommands)] in issue_289()
80 #[structopt(version = my_version())] in issue_324()
[all …]
Dflatten.rs9 use structopt::StructOpt;
22 #[structopt(flatten)] in flatten()
47 #[structopt(flatten)] in flatten_twice()
50 #[structopt(flatten)] in flatten_twice()
65 #[structopt(short)] in flatten_in_subcommand()
67 #[structopt(flatten)] in flatten_in_subcommand()
74 #[structopt(short)] in flatten_in_subcommand()
76 #[structopt(flatten)] in flatten_in_subcommand()
118 #[structopt(flatten)] in merge_subcommands_with_flatten()
139 #[structopt(flatten)] in subcommand_in_flatten()
[all …]
Drename_all_env.rs3 use structopt::StructOpt;
9 #[structopt(rename_all_env = "kebab")] in it_works()
11 #[structopt(env)] in it_works()
23 #[structopt(env)] in default_is_screaming()
34 #[structopt(rename_all_env = "kebab")] in overridable()
36 #[structopt(env)] in overridable()
39 #[structopt(rename_all_env = "pascal", env)] in overridable()
Dnested-subcommands.rs9 use structopt::StructOpt;
13 #[structopt(short, long)]
15 #[structopt(short, long, parse(from_occurrences))]
17 #[structopt(subcommand)]
29 #[structopt(short, long)]
31 #[structopt(short, long, parse(from_occurrences))]
33 #[structopt(subcommand)]
106 #[structopt(short, long)]
108 #[structopt(subcommand)]
116 #[structopt(subcommand)]
[all …]
/external/rust/crates/structopt/
DCHANGELOG.md3 * Fixed [another breakage](https://github.com/TeXitoi/structopt/issues/447)
8 * Fixed [a breakage](https://github.com/TeXitoi/structopt/issues/439)
13 * Added [StructOpt::from_args_safe](https://docs.rs/structopt/0.3/structopt/trait.StructOpt.html#ty…
18 * Unsafe code [has been forbidden](https://github.com/TeXitoi/structopt/issues/432). This makes
19 [`cargo geiger`](https://github.com/rust-secure-code/cargo-geiger) list structopt as "safe".
24 * Fixed [a breakage](https://github.com/TeXitoi/structopt/issues/424) with resent rustc versions
29 * Added [the new example](https://github.com/TeXitoi/structopt/blob/master/examples/required_if.rs).
30 * Allow `#[structopt(flatten)]` fields to have doc comments. The comments are ignored.
32 see [`#407`](https://github.com/TeXitoi/structopt/issues/407).
37 * Fixed [a latent bug](https://github.com/TeXitoi/structopt/pull/398),
[all …]
DREADME.md3structopt.svg?branch=master)](https://travis-ci.org/TeXitoi/structopt) [![](https://img.shields.io…
10structopt). You can also check the [examples](https://github.com/TeXitoi/structopt/tree/master/ex…
14 Add `structopt` to your dependencies of your `Cargo.toml`:
17 structopt = "0.3"
23 use structopt::StructOpt;
27 #[structopt(name = "basic")]
33 #[structopt(short, long)]
38 #[structopt(short, long, parse(from_occurrences))]
42 #[structopt(short, long, default_value = "42")]
46 #[structopt(short, long, parse(from_os_str))]
[all …]
/external/rust/crates/structopt/examples/
Dbasic.rs4 use structopt::StructOpt;
8 #[structopt(name = "basic")]
14 #[structopt(short, long)]
19 #[structopt(short, long, parse(from_occurrences))]
23 #[structopt(short, long, default_value = "42")]
27 #[structopt(short, long, parse(from_os_str))]
33 #[structopt(short = "c", long)]
37 #[structopt(short, long)]
41 #[structopt(name = "FILE", parse(from_os_str))]
Dgit.rs6 use structopt::StructOpt;
9 #[structopt(name = "git")]
14 #[structopt(long)]
16 #[structopt(long)]
18 #[structopt(default_value = "origin")]
21 #[structopt(help = "add files to the staging area")]
23 #[structopt(short)]
25 #[structopt(short)]
Drename_all.rs25 use structopt::StructOpt;
28 #[structopt(name = "rename_all", rename_all = "screaming_snake_case")]
36 #[structopt(long, short)]
43 #[structopt(rename_all = "pascal_case")]
47 #[structopt(rename_all = "snake_case", long)]
53 #[structopt(subcommand)]
57 #[structopt(flatten)]
71 #[structopt(long)]
Dgroup.rs3 use structopt::{clap::ArgGroup, StructOpt};
6 #[structopt(group = ArgGroup::with_name("verb").required(true))]
9 #[structopt(long, group = "verb")]
12 #[structopt(long, group = "verb")]
15 #[structopt(long, group = "verb")]
18 #[structopt(long, group = "verb")]
21 #[structopt(long, group = "verb")]
24 #[structopt(long, group = "verb")]
Ddoc_comments.rs3 use structopt::StructOpt;
8 #[structopt(name = "basic")]
12 #[structopt(short, long)]
34 #[structopt(short, long)]
37 #[structopt(
51 #[structopt(subcommand)]
56 #[structopt()]
Dexample.rs3 use structopt::StructOpt;
6 #[structopt(name = "example")]
10 #[structopt(short, long)]
15 #[structopt(short, long, default_value = "42")]
33 #[structopt(long)]
42 #[structopt(long)]
47 #[structopt(skip)]
Dskip.rs3 use structopt::StructOpt;
7 #[structopt(long, short)]
9 #[structopt(skip)]
11 #[structopt(skip)]
14 #[structopt(skip = Kind::A)]
16 #[structopt(skip = vec![1, 2, 3])]
18 #[structopt(skip = "cake")] // &str implements Into<String>
/external/rust/crates/structopt-derive/src/
Dlib.rs54 #[proc_macro_derive(StructOpt, attributes(structopt))]
56 pub fn structopt(input: proc_macro::TokenStream) -> proc_macro::TokenStream { in structopt() function
87 ::structopt::clap::AppSettings::SubcommandRequiredElseHelp in gen_augmentation()
94 let #app_var = <#subcmd_type as ::structopt::StructOptInternal>::augment_clap( in gen_augmentation()
130 let #app_var = <#ty as ::structopt::StructOptInternal>::augment_clap(#app_var); in gen_augmentation()
131 let #app_var = if <#ty as ::structopt::StructOptInternal>::is_subcommand() { in gen_augmentation()
132 #app_var.setting(::structopt::clap::AppSettings::SubcommandRequiredElseHelp) in gen_augmentation()
225 ::structopt::clap::Arg::with_name(#name) in gen_augmentation()
280 #field_name: <#subcmd_type as ::structopt::StructOptInternal>::from_subcommand( in gen_constructor()
287 #field_name: ::structopt::StructOpt::from_clap(#matches) in gen_constructor()
[all …]
/external/rust/crates/structopt/tests/ui/
Draw.stderr1 error: `#[structopt(raw(...))` attributes are removed in structopt 0.3, they are replaced with raw …
4 …all `clap::Arg/App::case_insensitive` method you can do it like this: #[structopt(case_insensitive…
8 13 | #[structopt(raw(case_insensitive = "true"))]
11 error: `#[structopt(raw(...))` attributes are removed in structopt 0.3, they are replaced with raw …
14 … to call `clap::Arg/App::requires_if` method you can do it like this: #[structopt(requires_if("one…
18 19 | #[structopt(raw(requires_if = r#""one", "two""#))]
Dsubcommand_and_methods.rs9 use structopt::StructOpt;
12 #[structopt(name = "make-cookie")]
14 #[structopt(short)]
17 #[structopt(subcommand, long)]
23 #[structopt(name = "pound")]
28 #[structopt(short)]
Dsubcommand_and_flatten.rs9 use structopt::StructOpt;
12 #[structopt(name = "make-cookie")]
14 #[structopt(short)]
17 #[structopt(subcommand, flatten)]
23 #[structopt(name = "pound")]
28 #[structopt(short)]
Dsubcommand_and_parse.rs9 use structopt::StructOpt;
12 #[structopt(name = "make-cookie")]
14 #[structopt(short)]
17 #[structopt(subcommand, parse(from_occurrences))]
23 #[structopt(name = "pound")]
28 #[structopt(short)]
Dsubcommand_opt_vec.rs9 use structopt::StructOpt;
12 #[structopt(name = "make-cookie")]
14 #[structopt(short)]
17 #[structopt(subcommand)]
23 #[structopt(name = "pound")]
28 #[structopt(short)]
Dsubcommand_opt_opt.rs9 use structopt::StructOpt;
12 #[structopt(name = "make-cookie")]
14 #[structopt(short)]
17 #[structopt(subcommand)]
23 #[structopt(name = "pound")]
28 #[structopt(short)]
Dskip_flatten.rs9 use structopt::StructOpt;
12 #[structopt(name = "make-cookie")]
14 #[structopt(short)]
17 #[structopt(skip, flatten)]
23 #[structopt(name = "pound")]
28 #[structopt(short)]

123456