pub struct Command {
pub name: &'static str,
pub summary: &'static str,
pub arguments: &'static str,
pub options: &'static [Opt],
pub exclusive: &'static [&'static [&'static str]],
pub for_agents: bool,
pub run: fn(&Parsed, &mut Context<'_>) -> Result<Report, Failure>,
}Expand description
One command of the CLI.
Fields§
§name: &'static str§summary: &'static str§arguments: &'static strPositional arguments, as help shows them: <name>.
options: &'static [Opt]§exclusive: &'static [&'static [&'static str]]Groups of options of which at most one may be given.
for_agents: boolWhether agents use it in a project: the generated AGENTS.md must say so, which a
test checks.
run: fn(&Parsed, &mut Context<'_>) -> Result<Report, Failure>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