app
Module: control::app
Section titled “Module: control::app”Contents
Section titled “Contents”Structs
App- Mutable application state for Policy Control.
firma_tui::control::app::App
Section titled “firma_tui::control::app::App”Struct
Mutable application state for Policy Control.
The runner owns side effects and feeds events into this type. App keeps
selection, help visibility, audit buffer state, policy row state, and the
runtime status that is rendered in the terminal frame.
Methods:
fn new(policy_dir: Option<PathBuf>, audit_connected: bool) -> Self- Creates application state from the resolved policy directory and auditfn with_policy_state_reader(policy_dir: Option<PathBuf>, audit_connected: bool, state_reader: PolicyStateReader) -> Self- Creates application state with an injected policy-state reader.fn status(self: &Self) -> ControlStatus- Builds a point-in-time status snapshot for rendering and tests.fn request_quit(self: & mut Self)- Requests shutdown.fn should_quit(self: &Self) -> bool- Returns true once shutdown has been requested.fn runtime_state(self: &Self) -> ControlRuntimeState- Current lifecycle state.fn toggle_help(self: & mut Self)- Toggles the help overlay.fn help_visible(self: &Self) -> bool- Returns true when the help overlay is visible.fn switch_pane(self: & mut Self)- Moves focus to the next pane.fn move_selection_up(self: & mut Self)- Moves selection up in the focused pane.fn move_selection_down(self: & mut Self)- Moves selection down in the focused pane.fn move_selection_first(self: & mut Self)- Moves selection to the first row in the focused pane.fn move_selection_last(self: & mut Self)- Moves selection to the last row in the focused pane.fn policy_dir(self: &Self) -> Option<&Path>- Authority policy directory, when it was resolved from the stack config.fn set_audit_filter(self: & mut Self, audit_filter: AuditFilter)- Changes the audit decision filter.fn selected_pane(self: &Self) -> Pane- Pane currently receiving navigation commands.fn selected_policy_index(self: &Self) -> usize- Index of the selected policy row.fn selected_audit_index(self: &Self) -> usize- Index of the selected audit row in the filtered view.fn audit_filter(self: &Self) -> AuditFilter- Current audit decision filter.fn audit_viewport_mode(self: &Self) -> AuditViewportMode- Current audit viewport tracking mode.fn policies(self: &Self) -> &[PolicyRow]- Policy rows currently rendered by the policies pane.fn policy_error(self: &Self) -> Option<&ControlError>- Current policy load or rewrite error.fn request_policy_edit(self: & mut Self) -> bool- Requests an edit session for the selected policy source.fn reload_policies(self: & mut Self)- Reloads policies from disk.fn finish_policy_edit(self: & mut Self)- Marks the external policy editor session as finished.fn audit_rows_len(self: &Self) -> usize- Number of audit rows retained in the bounded buffer.fn visible_audit_rows(self: &Self) -> impl Trait- Iterates over audit rows visible under the current filter.fn visible_audit_rows_len(self: &Self) -> usize- Number of audit rows visible under the current filter.fn push_audit_row(self: & mut Self, row: AuditRow)- Appends one audit row and updates audit selection.fn request_selected_policy_toggle(self: & mut Self) -> Option<PolicyRewriteRequest>- Queues a toggle request for the selected policy.fn request_all_policy_toggle(self: & mut Self) -> Vec<PolicyRewriteRequest>- Queues toggle requests for policies that need to change.fn finish_policy_rewrite(self: & mut Self, completion: &PolicyRewriteCompletion)- Applies a completed policy rewrite and refreshes disk-derived state.fn start_policy_rewrite(self: & mut Self, policy: &PolicyRewriteStart)- Marks rows from a started policy rewrite as writing.
Trait Implementations:
- Default
fn default() -> Self
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result