use-arg 0.0.1

Primitive owned argument tokens for RustUse CLI-adjacent code
Documentation
  • Coverage
  • 100%
    20 out of 20 items documented1 out of 19 items with examples
  • Size
  • Source code size: 7.71 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 449.53 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 6s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-cli
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-arg

Primitive owned argument tokens for CLI-adjacent Rust code.

use-arg works at the token level. It can identify positional-looking tokens, the -- option separator, and flag-like tokens, but it does not parse a command line or define parser state.

Example

use use_arg::{Arg, RawArgs, is_positional};

let input = Arg::from("README.md");
let args = RawArgs::from_iter([Arg::from("tool"), input.clone()]);

assert!(input.is_positional());
assert!(is_positional(input.as_str()));
assert_eq!(args.len(), 2);

Scope

This crate intentionally avoids full parsing, subcommands, option schemas, and grouped flag expansion.