MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / Options

Class Options

18_argparse/rust/argp/src/main.rs:15–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13#[derive(Debug, StructOpt)]
14#[structopt(name = "argparse example", about = "usage example")]
15struct Options {
16 /// filename of video to upload
17 #[structopt(short, long)]
18 file: std::path::PathBuf,
19 /// title if none given created from filename
20 #[structopt(short, long)]
21 title: Option<String>,
22 /// Video Category
23 #[structopt(long, default_value="science", possible_values = &Categories::VARIANTS)]
24 category: Categories,
25 /// show more output
26 #[structopt(short, long)]
27 verbose: bool,
28 /// provides names to greet
29 #[structopt(short = "n", long = "name")]
30 names: Vec<String>,
31}
32
33fn main() {
34 let options = Options::from_args();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected