Struct bdrck_params::command::Command
[−]
[src]
pub struct Command { pub name: String, pub help: String, pub options: Vec<Option>, pub arguments: Vec<Argument>, pub last_argument_is_variadic: bool, }
A command is a single sub-command for a given program. Each command has its own description as well as sets of options and arguments that it accepts.
Fields
name: String
help: String
options: Vec<Option>
arguments: Vec<Argument>
last_argument_is_variadic: bool
Methods
impl Command
[src]
fn new(name: &str,
help: &str,
options: Vec<Option>,
arguments: Vec<Argument>,
last_argument_is_variadic: bool)
-> Result<Command>
help: &str,
options: Vec<Option>,
arguments: Vec<Argument>,
last_argument_is_variadic: bool)
-> Result<Command>
Constructs a new Command structure. Performs some validation on the inputs, and returns either a valid Command or an appropriate error.