Capabilities
A Probe selects questions about the terminal. A Capabilities record holds
the replies. Your application owns both values and decides when to use the answers.
The probe captures environment values when you create it. You select queries, then write them through a terminal writer. Replies arrive beside keys in your event loop. Your application sends each identified reply to the appropriate record.
Evidence and choices
An optional answer stays None until a reply supplies evidence.
Boolean helpers report confirmed support. Silence leaves support unknown.
For example, caps.supports(mode) reports whether a mode reply confirms a usable mode.
The record describes what the terminal reports. ProgramOptions holds your
application preferences. program.apply_defaults(&caps) combines those preferences
with the answers and preserves explicit mode choices.
Color illustrates the distinction. The screen selects an initial color profile from the environment. A termcap reply can later confirm true color. The color concept explains that render choice.
Separate records
Core capabilities describe terminal modes, colors, keyboard protocols, and other
general terminal features. Domain libraries own their capability records.
For example, uncurses_glyph::Capabilities holds Glyph Protocol support.
A manager consumes its domain record. An application keeps changing runtime values,
such as window size, in its own state.
Records can accept identified replies throughout a session, including late replies. Your application decides when startup ends and when to apply new evidence.
See Querying the terminal for the startup procedure. See Custom probes for a local probe that shares a writer and event loop with the core probe. The API reference defines each recorded value.
