Crate rust_args_parser

Crate rust_args_parser 

Source
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
GroupMode
Group mode.
ValueHint
Value hint.

Functions§

dispatch
Default dispatch that prints auto help/version/author to stdout.
dispatch_to
Parse and dispatch starting from root using argv (not including program name), writing auto help/version/author output to out when 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).