es_fluent_cli/tui/message.rs
1use crate::core::GenerateResult;
2
3/// Messages that drive the TUI application state machine.
4#[derive(Debug)]
5pub enum Message {
6 /// Advance the throbber animation.
7 Tick,
8
9 /// User requested to quit the application.
10 Quit,
11
12 /// A file changed in a crate's source directory.
13 FileChanged {
14 /// Name of the crate where a file changed.
15 crate_name: String,
16 },
17
18 /// Generation started for a crate.
19 GenerationStarted {
20 /// Name of the crate being generated.
21 crate_name: String,
22 },
23
24 /// Generation completed (success or failure).
25 GenerationComplete {
26 /// Result of the generation.
27 result: GenerateResult,
28 },
29
30 /// An error occurred in the file watcher.
31 WatchError {
32 /// Error message to display.
33 error: String,
34 },
35}