xray-tui 1.4.1

A layer inspector for OCI-compliant images
Documentation
/// Represents a single action triggered by the user or the app itself.
#[derive(Debug, Clone)]
pub enum AppAction {
    /// An empty action that doesn't lead to any change in the app's state.
    /// Can be used to re-render the frame without changing any state.
    ///
    /// Contains the current size of the terminal.
    Empty((u16, u16)),
    /// Switch the active pane to the next one.
    TogglePane(Direction),
    /// Move in the specified [Direction] within the currently selected [super::view::Pane].
    Move(Direction),
    /// Interact with the currently selected element within the currently selected [super::view::Pane].
    Interact,
    /// Copy the currently selected field into the system clipboard.
    ///
    /// What is copied is up to the currently active pane.
    Copy,
    /// Show/hide the help pane.
    ToggleHelpPane,
    /// Select a specific pane by its index in the layout.
    SelectPane(usize),
    /// Toggle the input mode in the UI between "normal" and "insert" if the current pane supports it.
    ToggleInputMode,
    /// User inputted a character while in the "insert" mode.
    InputCharacter(char),
    /// User wants to delete a character while in the "insert" mode.
    InputDeleteCharacter,
    /// Scroll horizontally in the specified [Direction] within the currently selected [super::view::Pane].
    Scroll(Direction),
    /// Does a context-dependant subaction.
    ///
    /// The actual action depends on the currently active pane and its state.
    Subaction,
}

/// Represents a direction in which the user wants to [AppAction::Move] or [AppAction::Scroll].
#[derive(Debug, Default, Clone, Copy)]
pub enum Direction {
    #[default]
    Forward,
    Backward,
}