Available on crate feature
batteries
only.Expand description
§Batteries included - helpful parsers that use only public API
bpaf
comes with a few extra functions that use only public API in their implementation. You
might find them useful either for your code or as an inspiration source
To use anything in this module you need to enable batteries
cargo feature.
Examples contain combinatoric usage, for derive usage you should create a parser function and
use external
annotation.
Functions§
- cargo_
helper - Strip a command name if present at the front when used as a
cargo
command - get_
usage - Get usage for a parser
- toggle_
flag - Pick last passed value between two different flags
- verbose_
and_ quiet_ by_ number --verbose
and--quiet
flags with results encoded as number- verbose_
by_ slice --verbose
and--quiet
flags with results choosen from a slice of values