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§
- Strip a command name if present at the front when used as a
cargo
command - Get usage for a parser
- 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