Crate thd75_repl

Crate thd75_repl 

Source
Expand description

Library crate for thd75-repl.

This exposes the internal modules that need to be reachable from integration tests in tests/ and from the binary entry point in src/main.rs.

The binary is a thin wrapper that imports from this library via its own crate name.

Public modules here are part of the REPL’s internal API, not a stable library API for external consumers.

Modules§

check
Accessibility compliance self-check for the check subcommand. Accessibility compliance self-check.
confirm
Transmit confirmation prompt and script-mode gating. Transmit confirmation prompt and script-mode gating.
help_text
Per-command detailed help text, returned by help <command>, plus the multi-line mode help blobs used by help with no arguments. Per-command detailed help text.
lint
Accessibility lint checker for REPL output lines.
output
Pure format functions for every user-facing string.
script
Script mode: parse a file of REPL commands and execute them. Script mode: read commands from a file and execute them.

Macros§

aprintln
Print a line with an optional [HH:MM:SS] timestamp prefix and record it in the history buffer.

Constants§

HISTORY_CAPACITY_DEFAULT
Default number of lines retained by the history buffer.

Statics§

TIMESTAMPS
Global flag for timestamp output mode.
UTC_OFFSET_SECS
UTC offset in seconds, added to UTC time when forming timestamps.
VERBOSE
Global flag for verbose output mode.

Functions§

is_verbose
Read the current verbose flag.
last_lines
Retrieve the most recent n lines from the history buffer.
last_output
Rolling buffer of recent user-facing output lines, ordered oldest to newest. Appended to by every aprintln! invocation and read by the last REPL command.
record_output
Append line to the history buffer, evicting the oldest entry when the buffer would exceed the configured capacity. Intended to be called only from the aprintln! macro.
set_history_capacity
Update the history buffer capacity at startup.