Expand description
The Prompter: a terminal-agnostic driver for every prompt kind.
A Prompter binds three things — a Terminal, a resolved PromptMode,
and a rendering Style — and exposes one method per question type. The
prompt-kind logic lives in super::kinds; the prompter only wires the
shared state through to it, so the same call works over cooked stdio, a
raw-mode TTY, or a scripted test double.
Build one from the environment with Prompter::from_env — which auto-selects
a rich raw-mode terminal when one is available and the interactive feature
is compiled, else a line terminal — or from explicit parts with
Prompter::new for deterministic tests.
Structs§
- Prompter
- A terminal-agnostic prompt driver.