Skip to main content

Module console

Module console 

Source
Expand description

Developer console — command dispatcher, log ring-buffer, expression evaluator, auto-complete and history.

Structs§

CommandAutoComplete
Tab-completion engine: prefix-matches command names.
CommandHistory
Stores the last N typed commands for up/down arrow recall.
CommandOutput
The result returned by a command handler.
CommandRegistration
Metadata and handler for a registered command.
CommandRegistry
Holds all registered commands and dispatches them.
ConsoleFilter
Controls which log entries are visible.
ConsoleLine
A single log entry.
ConsolePrinter
Renders the console to a box-drawing ASCII string.
ConsoleSink
A sink that can receive log records from the log crate. Callers hold a reference and push into the DevConsole.
ConsoleState
The mutable game/engine state that console commands can inspect or modify. In a real engine this would hold references; here we use owned copies so the struct is 'static and thread-safe.
DevConsole
The developer console: log viewer + command input.

Enums§

LogLevel
Severity level for console log entries.

Functions§

eval_expression
Evaluate a simple infix mathematical expression. Supports: + - * / ^ ( ) sin cos tan sqrt abs pi e