pub struct Command {
pub name: &'static str,
pub args: &'static str,
pub summary: &'static str,
pub agent_facing: bool,
pub group: &'static str,
}Expand description
One choir subcommand.
Fields§
§name: &'static strSubcommand name.
args: &'static strArgument spec as shown in help, e.g. <api> <key-file>.
summary: &'static strOne line, imperative, no trailing period.
agent_facing: boolWhether an agent is expected to reach for this routinely.
group: &'static strWhich section of --help this belongs under.
Help used to be one flat list of every command in the order they were added, which is the order they were written rather than any order they are read in. Thirty-two lines like that is a wall, and the reader’s actual question — “what do I run to get a change reviewed” — was answered nowhere on the page.
A field rather than a lookup table beside the list, so a new command cannot be added without deciding where it belongs; the compiler asks.
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