Expand description
Terminal I/O abstraction for the TUI.
The TUI talks to the terminal exclusively through two traits: TermOut
(an ANSI byte sink plus the few queries/mode switches we need) and
EventSource (an async stream of crossterm input events). Production
code uses the crossterm/stdout-backed implementations in this module;
tests substitute a vt100-backed virtual terminal and scripted events so
the rendered screen state can be snapshot-tested.
Structs§
- Crossterm
Events - The real event source: polls crossterm events on the blocking thread pool, waking up every 16ms even without input so animations (e.g. the thinking spinner) keep redrawing.
- Crossterm
Term - The real terminal: writes to stdout and queries via crossterm.
Traits§
- Event
Source - Input half of a terminal: an async source of crossterm
Events. - TermOut
- Output half of a terminal: an ANSI escape-sequence sink plus the small set of queries and mode switches the TUI needs.