Logo by Misiasart
Thanks to all individual and corporate sponsors, without whom this work could not exist:
Provides CLI argument parsing (WIP).
use FacetPretty;
Logo by Misiasart
Thanks to all individual and corporate sponsors, without whom this work could not exist:
Provides CLI argument parsing (WIP).
use facet_pretty::FacetPretty;
#[test]
fn test_arg_parse() {
use facet::Facet;
#[derive(Facet)]
struct Args {
#[facet(positional)]
path: String,
#[facet(named, short = 'v')]
verbose: bool,
#[facet(named, short = 'j')]
concurrency: usize,
}
let args: Args = facet_args::from_slice(&["--verbose", "--concurrency", "14", "example.rs"]);
eprintln!("args: {}", args.pretty());
}