[][src]Macro argst::args

macro_rules! args {
    ($(
        $(#[$attr:meta])*
        $arg_name:ident : $arg_type:ty
    ),*$(,)?) => { ... };
}

A macro to generate StructOpt boilerplate and bind arguments

Example

use argst::args;
args!(
    /// The number of times to perform this operation
    #[structopt(long = "count")]
    n: usize,
    /// The path to the data file
    path: std::path::PathBuf,
);
println!("Running {} times over data at {}", n, path.display());