File: skip_with_other_options.rs

package info (click to toggle)
rust-structopt 0.3.26-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 796 kB
  • sloc: makefile: 2
file content (15 lines) | stat: -rw-r--r-- 252 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use structopt::StructOpt;

#[derive(StructOpt, Debug)]
#[structopt(name = "test")]
pub struct Opt {
    #[structopt(long)]
    a: u32,
    #[structopt(skip, long)]
    b: u32,
}

fn main() {
    let opt = Opt::from_args();
    println!("{:?}", opt);
}