Skip to main content

euv_core/runtime/fault/
enum.rs

1/// Health state of an `ErrorBoundary` fault-isolation domain.
2#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
3pub enum ErrorBoundaryState {
4    /// Boundary has no active consecutive faults and runs protected callbacks normally.
5    #[default]
6    Healthy,
7    /// Boundary caught one or more recent panics below its trip threshold and remains operational.
8    Degraded,
9    /// Boundary reached its consecutive panic threshold and requires explicit recovery.
10    Tripped,
11}
12
13/// Runtime execution site where a panic was intercepted by an `ErrorBoundary`.
14#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
15pub enum FaultOrigin {
16    /// Application event handler or widget callback.
17    #[default]
18    UserCallback,
19    /// Reactive `Effect` or derived observer closure.
20    ReactiveEffect,
21    /// Custom canvas, scene, or platform render hook.
22    RenderHook,
23    /// Cross-thread task drained by `UiDispatcher`.
24    DispatcherTask,
25    /// Asset decode or lifecycle callback.
26    AssetLoader,
27}