Skip to main content

Module control

Module control 

Source
Expand description

Command parsing and dispatch for the player UI.

This module is intentionally small and backend-agnostic. The UI can parse prompt input into a ParsedCommand, then dispatch it into any type that implements ControlEventHandler.

Structs§

CommandSpec
Canonical command plus accepted aliases.
ParsedCommand
A parsed command action plus the remaining prompt arguments.

Enums§

Command
All commands currently represented by the UI and prompt parser.
ParseCommandError
Errors returned by parse_command.

Constants§

COMMAND_SPECS
Commands and aliases accepted by parse_command.

Traits§

ControlEventHandler
Event sink implemented by the UI or a future playback backend.

Functions§

command_names
Returns all canonical command names as a slash-separated help string.
dispatch
Routes a parsed command to the matching ControlEventHandler callback.
parse_command
Parses prompt text into a command event.