Skip to main content

apply_command_mapping

Function apply_command_mapping 

Source
pub fn apply_command_mapping(
    commands: &mut [CachedCommand],
    mapping: &CommandMapping,
) -> Result<MappingResult, Error>
Expand description

Applies a CommandMapping to a list of cached commands.

For each command:

  • If the command’s first tag has a group mapping, sets display_group.
  • If the command’s operation_id has an operation mapping, sets display_name, display_group (if specified), aliases, and hidden.

§Errors

Returns an error if the resulting mappings produce name collisions.