| 1 | Help: |
| 2 | ```console |
| 3 | $ typed-derive implicit --help |
| 4 | Usage: typed-derive implicit [OPTIONS] |
| 5 | |
| 6 | Options: |
| 7 | -O <OPTIMIZATION> |
| 8 | Implicitly using `std::str::FromStr` |
| 9 | |
| 10 | -I <DIR> |
| 11 | Allow invalid UTF-8 paths |
| 12 | |
| 13 | --bind <BIND> |
| 14 | Handle IP addresses |
| 15 | |
| 16 | --sleep <SLEEP> |
| 17 | Allow human-readable durations |
| 18 | |
| 19 | --bump-level <BUMP_LEVEL> |
| 20 | Custom enums |
| 21 | |
| 22 | Possible values: |
| 23 | - major: Increase the major version (x.0.0) |
| 24 | - minor: Increase the minor version (x.y.0) |
| 25 | - patch: Increase the patch version (x.y.z) |
| 26 | |
| 27 | -h, --help |
| 28 | Print help (see a summary with '-h') |
| 29 | |
| 30 | ``` |
| 31 | |
| 32 | Optimization-level (number) |
| 33 | ```console |
| 34 | $ typed-derive implicit -O 1 |
| 35 | Implicit(ImplicitParsers { optimization: Some(1), include: None, bind: None, sleep: None, bump_level: None }) |
| 36 | |
| 37 | $ typed-derive implicit -O plaid |
| 38 | ? failed |
| 39 | error: invalid value 'plaid' for '-O <OPTIMIZATION>': invalid digit found in string |
| 40 | |
| 41 | For more information, try '--help'. |
| 42 | |
| 43 | ``` |
| 44 | |
| 45 | Include (path) |
| 46 | ```console |
| 47 | $ typed-derive implicit -I../hello |
| 48 | Implicit(ImplicitParsers { optimization: None, include: Some("../hello"), bind: None, sleep: None, bump_level: None }) |
| 49 | |
| 50 | ``` |
| 51 | |
| 52 | IP Address |
| 53 | ```console |
| 54 | $ typed-derive implicit --bind 192.0.0.1 |
| 55 | Implicit(ImplicitParsers { optimization: None, include: None, bind: Some(192.0.0.1), sleep: None, bump_level: None }) |
| 56 | |
| 57 | $ typed-derive implicit --bind localhost |
| 58 | ? failed |
| 59 | error: invalid value 'localhost' for '--bind <BIND>': invalid IP address syntax |
| 60 | |
| 61 | For more information, try '--help'. |
| 62 | |
| 63 | ``` |
| 64 | |
| 65 | Time |
| 66 | ```console |
| 67 | $ typed-derive implicit --sleep 10s |
| 68 | Implicit(ImplicitParsers { optimization: None, include: None, bind: None, sleep: Some(10s), bump_level: None }) |
| 69 | |
| 70 | $ typed-derive implicit --sleep forever |
| 71 | ? failed |
| 72 | error: invalid value 'forever' for '--sleep <SLEEP>': failed to parse "forever" in the "friendly" format: parsing a friendly duration requires it to start with a unit value (a decimal integer) after an optional sign, but no integer was found |
| 73 | |
| 74 | For more information, try '--help'. |
| 75 | |
| 76 | ``` |
| 77 | |
| 78 | Version field |
| 79 | ```console |
| 80 | $ typed-derive implicit --bump-level minor |
| 81 | Implicit(ImplicitParsers { optimization: None, include: None, bind: None, sleep: None, bump_level: Some(Minor) }) |
| 82 | |
| 83 | $ typed-derive implicit --bump-level 10.0.0 |
| 84 | ? failed |
| 85 | error: invalid value '10.0.0' for '--bump-level <BUMP_LEVEL>' |
| 86 | [possible values: major, minor, patch] |
| 87 | |
| 88 | For more information, try '--help'. |
| 89 | |
| 90 | $ typed-derive implicit --bump-level blue |
| 91 | ? failed |
| 92 | error: invalid value 'blue' for '--bump-level <BUMP_LEVEL>' |
| 93 | [possible values: major, minor, patch] |
| 94 | |
| 95 | For more information, try '--help'. |
| 96 | |
| 97 | ``` |