pub trait Command {
// Required methods
fn name<'a>(&self) -> &'a str;
fn help<'a>(&self) -> &'a str;
fn description<'a>(&self) -> &'a str;
fn run(&self, argv: &Vec<String>);
}Expand description
This trait must be implemented for each subcommand
Required Methods§
Sourcefn name<'a>(&self) -> &'a str
fn name<'a>(&self) -> &'a str
This fonction must return the command line, without space. Like
build, clean, …
Sourcefn help<'a>(&self) -> &'a str
fn help<'a>(&self) -> &'a str
Return the help message of a subcommand. Used for bin help subcommand
Sourcefn description<'a>(&self) -> &'a str
fn description<'a>(&self) -> &'a str
Return a one line description. Used for the program help bin -h