|
15 | 15 | //! |
16 | 16 | //! # Provided arguments |
17 | 17 | //! |
18 | | -//! `--help` and `--version` arguments are automatically generated. When the parser encounters |
| 18 | +//! `--help|-h` and `--version|-V` arguments are automatically generated. When the parser encounters |
19 | 19 | //! either, it will print the help or version message and exit the application with exit code 0. |
20 | 20 | //! |
21 | 21 | //! # Field attributes |
|
33 | 33 | //! |
34 | 34 | //! Here is the list of supported field "primitive" types: |
35 | 35 | //! |
36 | | -//! | Type | Description | |
37 | | -//! |---------------|--------------------------------------------------| |
38 | | -//! | `bool` | Defines a flag. | |
39 | | -//! | `f32|f64` | Floating point number option. | |
40 | | -//! | `i8|u8` | 8-bit integer option. | |
41 | | -//! | `i16|u16` | 16-bit integer option. | |
42 | | -//! | `i32|u32` | 32-bit integer option. | |
43 | | -//! | `i64|u64` | 64-bit integer option. | |
44 | | -//! | `i128|u128` | 128-bit integer option. | |
45 | | -//! | `isize|usize` | Pointer-sized integer option. | |
46 | | -//! | `OsString` | A string option with platform-specific encoding. | |
47 | | -//! | `PathBuf` | A file system path option. | |
48 | | -//! | `String` | UTF-8 encoded string option. | |
| 36 | +//! | Type | Description | |
| 37 | +//! |------------------|--------------------------------------------------| |
| 38 | +//! | `bool` | Defines a flag. | |
| 39 | +//! | `f32`\|`f64` | Floating point number option. | |
| 40 | +//! | `i8`\|`u8` | 8-bit integer option. | |
| 41 | +//! | `i16`\|`u16` | 16-bit integer option. | |
| 42 | +//! | `i32`\|`u32` | 32-bit integer option. | |
| 43 | +//! | `i64`\|`u64` | 64-bit integer option. | |
| 44 | +//! | `i128`\|`u128` | 128-bit integer option. | |
| 45 | +//! | `isize`\|`usize` | Pointer-sized integer option. | |
| 46 | +//! | `OsString` | A string option with platform-specific encoding. | |
| 47 | +//! | `PathBuf` | A file system path option. | |
| 48 | +//! | `String` | UTF-8 encoded string option. | |
49 | 49 | //! |
50 | 50 | //! Additionally, some wrapper and composite types are also available, where the type `T` must be |
51 | 51 | //! one of the primitive types listed above. |
52 | 52 | //! |
53 | | -//! | Type | Description | |
54 | | -//! |---------------|-----------------------------------| |
55 | | -//! | `Option<T>` | An optional argument. | |
56 | | -//! | `Vec<T>` | Positional arguments (see below). | |
| 53 | +//! | Type | Description | |
| 54 | +//! |-------------|-----------------------------------| |
| 55 | +//! | `Option<T>` | An optional argument. | |
| 56 | +//! | `Vec<T>` | Positional arguments (see below). | |
57 | 57 | //! |
58 | 58 | //! In argument parsing parlance, "flags" are simple boolean values; the argument does not require |
59 | 59 | //! a value. For example, the argument `--help`. |
@@ -303,7 +303,7 @@ pub fn derive_parser(input: TokenStream) -> TokenStream { |
303 | 303 | ); |
304 | 304 |
|
305 | 305 | fn parse(args: Vec<std::ffi::OsString>) -> Result<Self, ::onlyargs::CliError> {{ |
306 | | - use ::onlyargs::extensions::*; |
| 306 | + use ::onlyargs::traits::*; |
307 | 307 |
|
308 | 308 | {flags_vars} |
309 | 309 | {options_vars} |
|
0 commit comments