Skip to main content

SubCommands

Trait SubCommands 

Source
pub trait SubCommands: FromArgs {
    const COMMANDS: &'static [&'static CommandInfo];

    // Provided method
    fn dynamic_commands() -> &'static [&'static CommandInfo]  { ... }
}
Expand description

A FromArgs implementation that can parse into one or more subcommands.

Required Associated Constants§

Source

const COMMANDS: &'static [&'static CommandInfo]

Info for the commands.

Provided Methods§

Source

fn dynamic_commands() -> &'static [&'static CommandInfo]

Get a list of commands that are discovered at runtime.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: SubCommand> SubCommands for T

Source§

const COMMANDS: &'static [&'static CommandInfo]