Type Definition clap::builder::Command

source · []
pub type Command<'help> = App<'help>;
Expand description

Build a command-line interface.

This includes defining arguments, subcommands, parser behavior, and help output. Once all configuration is complete, the Command::get_matches family of methods starts the runtime-parsing process. These methods then return information about the user supplied arguments (or lack thereof).

When deriving a Parser, you can use CommandFactory::command to access the Command.


let m = Command::new("My Program")
    .author("Me, me@mail.com")
    .about("Explains in brief what the program does")
    .after_help("Longer explanation to appear after the options when \
                 displaying the help information from --help or -h")

// Your program logic starts here...