runner
Module: control::runner
Section titled “Module: control::runner”Contents
Section titled “Contents”Structs
HeadlessRunner- Runner variant used by non-terminal tests.
Enums
ControlCrankOutcome- Result of processing one headless runner step.EventKind- Coarse event category used by runner tests.
firma_tui::control::runner::ControlCrankOutcome
Section titled “firma_tui::control::runner::ControlCrankOutcome”Enum
Result of processing one headless runner step.
Variants:
NoEvent- No user or external event was ready.Processed(EventKind)- One non-tick event was processed.Quit- Shutdown was requested.
Traits: Eq, Copy
Trait Implementations:
- Clone
fn clone(self: &Self) -> ControlCrankOutcome
- PartialEq
fn eq(self: &Self, other: &ControlCrankOutcome) -> bool
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_tui::control::runner::EventKind
Section titled “firma_tui::control::runner::EventKind”Enum
Coarse event category used by runner tests.
Variants:
Audit- Audit rows were consumed.Input- Keyboard input was consumed.Mouse- Mouse input was consumed.Resize- Terminal resize was consumed.
Traits: Eq, Copy
Trait Implementations:
- Clone
fn clone(self: &Self) -> EventKind
- PartialEq
fn eq(self: &Self, other: &EventKind) -> bool
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_tui::control::runner::HeadlessRunner
Section titled “firma_tui::control::runner::HeadlessRunner”Struct
Runner variant used by non-terminal tests.
It uses the same app and event-source types as the real runner, but callers provide a fake terminal input source and drive one step at a time.
Generic Parameters:
- ‘a
Methods:
fn new(policy_dir: Option<PathBuf>) -> Self- Creates a headless runner without an audit source.fn with_audit_rows(policy_dir: Option<PathBuf>, audit_rows: Option<&'a Receiver<crate::control::AuditRow>>) -> Self- Creates a headless runner with an optional audit row receiver.fn app(self: &Self) -> &App- Returns the current application state.fn sources(self: &Self) -> &Sources<'a>- Returns the event sources consumed by this runner.fn try_crank<impl event::TerminalEventSource>(self: & mut Self, terminal: &impl Trait) -> anyhow::Result<ControlCrankOutcome>- Processes at most one ready event.fn execute_effects(self: & mut Self, effects: Vec<ControlEffect>)- Executes command side effects against the headless app.