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 Policy Control runner.
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 Policy Control runner.
Terminal input, audit rows, rewrite notifications, and ticks all flow through this single type so command handling can remain deterministic.
Variants:
Audit(Vec<crate::control::state::AuditRow>)- Batch of audit rows drained from the monitor-backed audit source.Key(crossterm::event::KeyCode)- Pressed terminal key.PolicyRewrite(crate::control::rewrite::PolicyRewriteEvent)- Policy rewrite worker notification.Resize- Terminal resize notification.Mouse- Mouse input, currently ignored by command handling.Tick- Redraw tick when no higher-priority event is ready.
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_tui::control::event::Sources
Section titled “firma_tui::control::event::Sources”Struct
External event sources consumed by the TUI.
Audit rows are borrowed from the CLI service. Policy rewrite events are owned here so shutdown can stop accepting new rewrites before the runner exits.
Generic Parameters:
- ‘a
Methods:
fn with_policy_rewrite_handler(audit_rows: Option<&'a Receiver<AuditRow>>, handler: PolicyRewriteHandler) -> Self- Creates sources with an injected rewrite handler for tests.fn enqueue_policy_rewrite(self: &Self, request: PolicyRewriteRequest) -> bool- Enqueues a policy rewrite if the queue is still accepting work.fn rewrite_queue_len(self: &Self) -> usize- Number of rewrite requests waiting behind the active worker.
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.