Struct argi::Command [−][src]
pub struct Command<'a> {
pub name: &'a str,
pub args: Vec<Argument<'a>>,
pub subcmds: Vec<Command<'a>>,
pub used: bool,
pub data: Option<String>,
pub help: Help<'a>,
pub parses: Option<&'a str>,
pub parses_opt: bool,
pub run: Option<fn(_: &Self, _: Option<String>)>,
}
Fields
name: &'a str
args: Vec<Argument<'a>>
subcmds: Vec<Command<'a>>
used: bool
Indicates if a user has invoked this command at any point
data: Option<String>
Raw data found from parsing
help: Help<'a>
Help message, if added, for this argument
parses: Option<&'a str>
The type of data this argument parses, if any
parses_opt: bool
Indicates if parsing is an optional endeavour
run: Option<fn(_: &Self, _: Option<String>)>
User-implemented closure which is ran at parse-time, if added