Skip to content

command

Enums


firma_tui::control::command::ControlCommand

Section titled “firma_tui::control::command::ControlCommand”

Enum

User command after key bindings and UI context have been resolved.

Commands update application state immediately when possible. Work that needs the runner, such as queueing a rewrite or opening a source file, is returned as a [ControlEffect].

Variants:

  • ToggleAbout - Toggle the about overlay.
  • CloseAbout - Close the about overlay.
  • ToggleHelp - Toggle the help overlay.
  • CloseHelp - Close the help overlay.
  • CloseAuditInspect - Close the audit row inspector.
  • ToggleSelectedPolicy - Request a rewrite for the selected policy.
  • ToggleAllPolicies - Request rewrites for every policy that needs to change.
  • SetAuditFilter(crate::control::state::AuditFilter) - Change the audit decision filter.
  • OpenPolicySource - Open the selected policy source in an editor.
  • InspectAuditRow - Open the selected audit row inspector.
  • MoveSelection(SelectionMovement) - Move selection in the focused pane.
  • SwitchPane - Move focus between panes.
  • Quit - Request an orderly shutdown.

Traits: Eq, Copy

Trait Implementations:

  • Clone
    • fn clone(self: &Self) -> ControlCommand
  • PartialEq
    • fn eq(self: &Self, other: &ControlCommand) -> bool
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result

firma_tui::control::command::ControlEffect

Section titled “firma_tui::control::command::ControlEffect”

Enum

Side effect returned by command application.

Effects are executed by the runner so command handling can stay focused on state transitions.

Variants:

  • Announce(crate::control::announcement::ControlAnnouncement) - Emit a runtime announcement.
  • EnqueuePolicyRewrite(crate::control::state::PolicyRewriteRequest) - Queue a policy rewrite request.
  • OpenPolicySource(std::path::PathBuf) - Open a policy source path in the operator’s editor.

Trait Implementations:

  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result

firma_tui::control::command::SelectionMovement

Section titled “firma_tui::control::command::SelectionMovement”

Enum

Row movement requested by keyboard navigation.

Variants:

  • Up - Move one row toward the start of the focused list.
  • Down - Move one row toward the end of the focused list.
  • First - Move to the first row of the focused list.
  • Last - Move to the last row of the focused list.

Traits: Copy, Eq

Trait Implementations:

  • Clone
    • fn clone(self: &Self) -> SelectionMovement
  • PartialEq
    • fn eq(self: &Self, other: &SelectionMovement) -> bool
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result