Expand description
SPDX-License-Identifier: MIT or Apache-2.0 rust-args-parser — Tiny, fast, callback-based CLI argument parser for Rust inspired by https://github.com/milchinskiy/c-args-parser
Structs§
- CmdSpec
- Command specification.
- Env
- Environment configuration
- OptSpec
- An option/flag specification.
- PosSpec
- Positional argument specification.
Enums§
- ArgKind
- Whether the option takes a value or not.
- Error
- Error type
- Group
Mode - Group mode.
- Value
Hint - Value hint.
Functions§
- dispatch
- Default dispatch that prints auto help/version/author to stdout.
- dispatch_
to - Parse and dispatch starting from
rootusingargv(not including program name), writing auto help/version/author output tooutwhen triggered. - print_
author_ to - Prints the author
- print_
help_ to - Print help to the provided writer.
- print_
version_ to - Prints the version number
Type Aliases§
- OptCallback
- Each option/flag invokes a callback.
- Result
- Library level error type.
- RunCallback
- Command runner for the resolved command (receives final positionals).