event
Module: control::event
Section titled “Module: control::event”Contents
Section titled “Contents”Structs
Sources- External event sources consumed by the TUI.
Enums
Event- Event consumed by the command layer.
Functions
next_with_terminal- Returns the next control event using an injected terminal source.
Traits
TerminalEventSource- Source of terminal input used by the event pump.
firma_tui::control::event::Event
Section titled “firma_tui::control::event::Event”Enum
Event consumed by the command layer.
Variants:
Audit(Vec<crate::control::state::AuditRow>)- Batch of sidecar audit rows from the monitor audit source.Key(crossterm::event::KeyCode)- Pressed key.Resize- Terminal resize notification.Mouse- Mouse input, currently ignored by command handling.Tick- Redraw tick when no higher-priority event is ready.
Traits: Eq
Trait Implementations:
- PartialEq
fn eq(self: &Self, other: &Event) -> bool
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Clone
fn clone(self: &Self) -> Event
firma_tui::control::event::Sources
Section titled “firma_tui::control::event::Sources”Struct
External event sources consumed by the TUI.
Generic Parameters:
- ‘a
Methods:
fn new(audit_rows: Option<&'a Receiver<AuditRow>>) -> Self- Creates sources with an optional audit receiver.
firma_tui::control::event::TerminalEventSource
Section titled “firma_tui::control::event::TerminalEventSource”Trait
Source of terminal input used by the event pump.
Tests provide a fake implementation so event priority can be checked without entering raw mode.
Methods:
poll: Checks whether a terminal event is ready before the timeout expires.read: Reads the next terminal event.
firma_tui::control::event::next_with_terminal
Section titled “firma_tui::control::event::next_with_terminal”Function
Returns the next control event using an injected terminal source.
Errors
Section titled “Errors”Returns an error when terminal polling or terminal event reading fails.
fn next_with_terminal<impl TerminalEventSource>(sources: &Sources, terminal: &impl Trait, timeout: std::time::Duration) -> anyhow::Result<Event>