Trait subcmd::Command [] [src]

pub trait Command {
    fn name<'a>(&self) -> &'a str;
    fn help<'a>(&self) -> &'a str;
    fn description<'a>(&self) -> &'a str;
    fn run(&self, argv: &Vec<String>);
}

This trait must be implemented for each subcommand

Required Methods

This fonction must return the command line, without space. Like build, clean, ...

Return the help message of a subcommand. Used for bin help subcommand

Return a one line description. Used for the program help bin -h

Main entry point. argv contains all argument passed to the binary, with the program name in argv[0]

Implementors