Skip to main content

euv_cli/hot/
enum.rs

1use super::*;
2
3/// Classification of live hot-reload events broadcast over SSE (`/__euv_hmr`).
4#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
5pub enum HmrEventKind {
6    /// Static docs or Web bundle rebuilt; browser clients should hot-reload.
7    Reload,
8    /// Dynamic WASM OTA binary updated; native and web clients may fetch v1 OTA releases.
9    OtaUpdate,
10    /// Incremental rebuild reported a compilation or Markdown error.
11    BuildError,
12}
13
14/// Outcome returned by the zero-flicker build-before-swap native rebuild controller.
15#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
16pub enum SwapOutcome {
17    /// Initial native process was launched.
18    LaunchedInitial,
19    /// Updated binary compiled cleanly; previous process stopped and new process started.
20    Swapped,
21    /// Compilation failed; the previous running app window was kept alive without flicker.
22    KeptRunningOnError(String),
23}