pub struct Command {
pub name: &'static str,
pub about: &'static str,
pub long_about: &'static str,
pub after_help: &'static str,
pub after_long_help: &'static str,
pub items: &'static [Item],
pub subcommands: &'static [Sub],
pub subcommand_required: bool,
pub help_flag: bool,
pub help_short: bool,
pub version: Option<&'static str>,
}Expand description
Fields§
§name: &'static strThe command’s own name; empty for a root that leaves it to argv[0].
about: &'static strFirst paragraph of the description.
long_about: &'static strThe whole description, for --help.
after_help: &'static strText after the lists, for -h.
after_long_help: &'static strText after the lists, for --help.
items: &'static [Item]Flags and positionals, in declaration order.
subcommands: &'static [Sub]Subcommands, in declaration order.
subcommand_required: boolWhether a subcommand must be given.
help_flag: boolWhether --help is supplied (not declared or disabled).
help_short: boolWhether the supplied help flag has -h as well as --help.
version: Option<&'static str>The version, when -V/--version are supplied.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more