Skip to main content

reserved_command_names

Function reserved_command_names 

Source
pub fn reserved_command_names() -> Vec<String>
Expand description

Every command name a new command may not take: the framework’s own subcommands plus RESERVED_PLUGIN_COMMAND_NAMES.

The framework half is read off the derived clap parser rather than hand-listed, so adding a subcommand to Command in lib.rs automatically reserves its name here. A hand-maintained copy would have drifted the first time someone added one.

This matters because dispatch tries app/plugin commands before the built-in parser (lib.rs, step 1 vs step 2). A user command named migrate wouldn’t collide loudly — it would just quietly take over, and their migrations would stop applying.