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§
Sourceconst COMMANDS: &'static [&'static CommandInfo]
const COMMANDS: &'static [&'static CommandInfo]
Info for the commands.
Provided Methods§
Sourcefn dynamic_commands() -> &'static [&'static CommandInfo]
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", so this trait is not object safe.