Skip to main content

Crate flashkraft_tui

Crate flashkraft_tui 

Source
Expand description

FlashKraft TUI — Library crate

This crate exposes the full Ratatui terminal UI as a library so that:

  • The flashkraft-tui binary can stay thin (argument parsing + lib::run())
  • Examples can import types directly from flashkraft_tui::

§Module layout

flashkraft_tui
├── domain  ← re-exported from flashkraft_core::domain
├── core    ← re-exported from flashkraft_core (commands, flash_writer, …)
└── tui     ← Ratatui front-end (app / events / flash_runner / ui)

The file-browser widget is provided by the tui-file-explorer crate and consumed directly via tui_file_explorer::*.

Re-exports§

pub use tui::app::App;
pub use tui::app::AppScreen;
pub use tui::app::InputMode;
pub use tui::app::UsbEntry;
pub use tui::events::handle_key;
pub use tui::ui::render;

Modules§

core
Re-export flashkraft_core under the short alias core so that crate::core::commands::load_drives(), crate::core::flash_helper::*, etc. resolve correctly from every submodule and from examples via flashkraft_tui::core::*.
domain
Re-export flashkraft_core::domain at the crate root so that crate::domain::DriveInfo / crate::domain::ImageInfo resolve in submodules, and so that examples can write flashkraft_tui::domain::*. Domain Module
flash_helper
Flash Pipeline
tui
Ratatui front-end — app state, event handling, flash runner, UI rendering.

Structs§

FileExplorer
State for the file-explorer widget.
FsEntry
A single entry shown in the file-explorer list.

Enums§

ExplorerOutcome
Outcome returned by crate::FileExplorer::handle_key.
FlashEvent
Progress events produced by the background flash task.

Functions§

restore_terminal
Disable raw mode and leave the alternate screen.
run
Set up the terminal, run the application event loop, then restore the terminal on exit (or on panic).
run_app
Drive the App state machine until should_quit is set.