Trait stdcli::prelude::StructOpt
[−]
[src]
pub trait StructOpt { fn clap<'a, 'b>() -> App<'a, 'b>; fn from_clap(ArgMatches) -> Self; fn from_args() -> Self { ... } }
A struct that is converted from command line arguments.
Required Methods
fn clap<'a, 'b>() -> App<'a, 'b>
Returns the corresponding clap::App
.
fn from_clap(ArgMatches) -> Self
Creates the struct from clap::ArgMatches
. It cannot fail
with a parameter generated by clap
by construction.
Provided Methods
fn from_args() -> Self
Gets the struct from the command line arguments. Print the error message and quit the program in case of failure.