optz
A no-magic option parser for Rust.
optz provides a simple, flexible, and minimalistic way to parse
command-line options in Rust applications. It focuses on clarity
and control, avoiding "magic" behavior in favor of explicit
configuration.
Usage
Basic Example
use ;
let optz = new
.option
.option
.parse
.unwrap;
if optz.get.unwrap.unwrap
let count: u32 = optz.get.unwrap.unwrap;
println!;
Example with Configuration
let config = MyConfig ;
let optz = new
.config
.option
.parse
.unwrap;
let retrieved: &MyConfig = optz.get_config.unwrap;
assert_eq!;
Example with Handlers
let optz = from_args
.option
.parse
.unwrap;
TODO
- Check types during parsing instead of at
get()