| 1 | Help: |
| 2 | ```console |
| 3 | $ typed-derive builtin --help |
| 4 | Usage: typed-derive builtin [OPTIONS] |
| 5 | |
| 6 | Options: |
| 7 | --port <PORT> Support for discrete numbers [default: 22] [possible values: 22, 80] |
| 8 | --log-level <LOG_LEVEL> Support enums from a foreign crate that don't implement `ValueEnum` [default: info] [possible values: trace, debug, info, warn, error] |
| 9 | -h, --help Print help |
| 10 | |
| 11 | ``` |
| 12 | |
| 13 | Discrete numbers |
| 14 | ```console |
| 15 | $ typed-derive builtin --port 22 |
| 16 | Builtin(BuiltInParsers { port: 22, log_level: Info }) |
| 17 | |
| 18 | $ typed-derive builtin --port 80 |
| 19 | Builtin(BuiltInParsers { port: 80, log_level: Info }) |
| 20 | |
| 21 | $ typed-derive builtin --port |
| 22 | ? failed |
| 23 | error: a value is required for '--port <PORT>' but none was supplied |
| 24 | [possible values: 22, 80] |
| 25 | |
| 26 | For more information, try '--help'. |
| 27 | |
| 28 | $ typed-derive builtin --port 3000 |
| 29 | ? failed |
| 30 | error: invalid value '3000' for '--port <PORT>' |
| 31 | [possible values: 22, 80] |
| 32 | |
| 33 | For more information, try '--help'. |
| 34 | |
| 35 | ``` |
| 36 | |
| 37 | Enums from crates that can't implement `ValueEnum` |
| 38 | ```console |
| 39 | $ typed-derive builtin --log-level debug |
| 40 | Builtin(BuiltInParsers { port: 22, log_level: Debug }) |
| 41 | |
| 42 | $ typed-derive builtin --log-level error |
| 43 | Builtin(BuiltInParsers { port: 22, log_level: Error }) |
| 44 | |
| 45 | $ typed-derive builtin --log-level |
| 46 | ? failed |
| 47 | error: a value is required for '--log-level <LOG_LEVEL>' but none was supplied |
| 48 | [possible values: trace, debug, info, warn, error] |
| 49 | |
| 50 | For more information, try '--help'. |
| 51 | |
| 52 | $ typed-derive builtin --log-level critical |
| 53 | ? failed |
| 54 | error: invalid value 'critical' for '--log-level <LOG_LEVEL>' |
| 55 | [possible values: trace, debug, info, warn, error] |
| 56 | |
| 57 | For more information, try '--help'. |
| 58 | |
| 59 | ``` |