]> git.proxmox.com Git - cargo.git/blob - vendor/clap/examples/tutorial_derive/04_02_parse.md
New upstream version 0.63.1
[cargo.git] / vendor / clap / examples / tutorial_derive / 04_02_parse.md
1 ```console
2 $ 04_02_parse_derive --help
3 clap [..]
4 A simple to use, efficient, and full-featured Command Line Argument Parser
5
6 USAGE:
7 04_02_parse_derive[EXE] <PORT>
8
9 ARGS:
10 <PORT> Network port to use
11
12 OPTIONS:
13 -h, --help Print help information
14 -V, --version Print version information
15
16 $ 04_02_parse_derive 22
17 PORT = 22
18
19 $ 04_02_parse_derive foobar
20 ? failed
21 error: Invalid value "foobar" for '<PORT>': invalid digit found in string
22
23 For more information try --help
24
25 $ 04_02_parse_derive 0
26 ? failed
27 error: Invalid value "0" for '<PORT>': 0 is not in 1..=65535
28
29 For more information try --help
30
31 ```