Module bpaf::batteries

source ·
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

Strip a command name if present at the front when used as a cargo command
Pick last passed value between two different flags
--verbose and --quiet flags with results encoded as number
--verbose and --quiet flags with results choosen from a slice of values