Expand description
FlashKraft TUI — Library crate
This crate exposes the full Ratatui terminal UI as a library so that:
- The
flashkraft-tuibinary 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_coreunder the short aliascoreso thatcrate::core::commands::load_drives(),crate::core::flash_helper::*, etc. resolve correctly from every submodule and from examples viaflashkraft_tui::core::*. - domain
- Re-export
flashkraft_core::domainat the crate root so thatcrate::domain::DriveInfo/crate::domain::ImageInforesolve in submodules, and so that examples can writeflashkraft_tui::domain::*. Domain Module - flash_
helper - Flash Pipeline
- tui
- Ratatui front-end — app state, event handling, flash runner, UI rendering.
Structs§
- File
Explorer - State for the file-explorer widget.
- FsEntry
- A single entry shown in the file-explorer list.
Enums§
- Explorer
Outcome - Outcome returned by
crate::FileExplorer::handle_key. - Flash
Event - 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
Appstate machine untilshould_quitis set.