commander-core 1.2.0

This crate is used by commander-rust only. Please don't use it!
Documentation
  • Coverage
  • 44.44%
    8 out of 18 items documented0 out of 8 items with examples
  • Size
  • Source code size: 72.75 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 6.16 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • MSDimos

This crate is using for commander_rust.

Only Application, Cli, Raw you will use.

Application will be returned by macro run!(). It's readonly. You can get application information through it. Application contains all information you defined using #[option] ,#[command] and #[entry]. See Application for more details.

Cli is an interface of CLI. You can get all argument of options through it. Cli offered two convenient method to get argument of options. They are get(idx: &str) -> Raw and get_or<T: From<Raw>>(&self, idx: &str, d: T) -> T. See Cli for more details.

Raw is encapsulation of something. It a sequence of String. You can regard it as Raw(<Vec<String>>). In fact, it is. Raw is using for types convert. Any type implemented From<Raw> can be types of command processing functions' parameter. For example, Vec<i32> implemented From<Raw>. So you can use it like fn method(v: Vec<i32>). But slice is not implemented From<Raw>, so you can not use it like fn method(s: [i32]). Once type implemented From<Raw>, you can covert it's type using let right: bool = raw.into().