2021-12-15 17:12:16 +00:00
|
|
|
*Jump to [source](keyvalue-derive.rs)*
|
2021-12-08 01:01:55 +00:00
|
|
|
|
2021-12-08 22:46:49 +00:00
|
|
|
**This requires enabling the `derive` feature flag.**
|
|
|
|
|
2022-01-05 16:54:33 +00:00
|
|
|
```console
|
2021-12-15 17:12:16 +00:00
|
|
|
$ keyvalue-derive --help
|
2021-12-08 01:01:55 +00:00
|
|
|
clap
|
|
|
|
|
|
|
|
USAGE:
|
2021-12-15 17:12:16 +00:00
|
|
|
keyvalue-derive[EXE] [OPTIONS]
|
2021-12-08 01:01:55 +00:00
|
|
|
|
|
|
|
OPTIONS:
|
|
|
|
-D <DEFINES>
|
|
|
|
-h, --help Print help information
|
2022-01-05 16:54:33 +00:00
|
|
|
|
2021-12-15 17:12:16 +00:00
|
|
|
$ keyvalue-derive -D Foo=10 -D Alice=30
|
2021-12-08 01:01:55 +00:00
|
|
|
Args { defines: [("Foo", 10), ("Alice", 30)] }
|
2022-01-05 16:54:33 +00:00
|
|
|
|
2021-12-15 17:12:16 +00:00
|
|
|
$ keyvalue-derive -D Foo
|
2021-12-08 01:01:55 +00:00
|
|
|
? failed
|
|
|
|
error: Invalid value for '-D <DEFINES>': invalid KEY=value: no `=` found in `Foo`
|
|
|
|
|
|
|
|
For more information try --help
|
2022-01-05 16:54:33 +00:00
|
|
|
|
2021-12-15 17:12:16 +00:00
|
|
|
$ keyvalue-derive -D Foo=Bar
|
2021-12-08 01:01:55 +00:00
|
|
|
? failed
|
|
|
|
error: Invalid value for '-D <DEFINES>': invalid digit found in string
|
|
|
|
|
|
|
|
For more information try --help
|
2022-01-05 16:54:33 +00:00
|
|
|
|
2021-12-08 01:01:55 +00:00
|
|
|
```
|