bene 0.1.1

A command line argument parser/reader
Documentation
  • Coverage
  • 25%
    2 out of 8 items documented1 out of 7 items with examples
  • Size
  • Source code size: 5.71 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.7 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 26s Average build duration of successful builds.
  • all releases: 26s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • sagansfault/bene
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • sagansfault

bene

Bene is a library for parsing command line arguments efficiently and elegantly.

Example:
The command line arguments:

-f 20 --length 5 --lib

Would be parsed as:

let mut frames: usize = 30; // default values
let mut length = 3; // inferred i32
let mut lib = false; // non valued flags are treated as booleans

// let input = "-f 20 --length 5 --lib"
bene::Intake::new()
    .arg('f', "frames", &mut frames)
    .arg('l', "length", &mut length)
    .arg('L', "lib", &mut lib) // case sensitive!
    .process(input);

assert_eq!(frames, 20);
assert_eq!(length, 5);
assert_eq!(lib, true);