euv_core/scene/lifecycle/enum.rs
1/// Retention policy controlling how a routed page behaves when the user navigates away.
2#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
3pub enum PageRetention {
4 /// Dispose the page subtree, reactive scope, and lifecycle resources on leave; recreate fresh on next visit.
5 Destroy,
6 /// Retain the scene subtree hidden (`Display::None`), freeze all reactive effects and animations while tracking cross-page dirty state, and coalesce updates atomically on resume.
7 #[default]
8 Freeze,
9 /// Hide the page visually (`Display::None`) while keeping its reactive effects running in the background.
10 Alive,
11}
12
13/// Lifecycle phase of a mounted `Component` or routed page managed by the framework.
14#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
15pub enum LifecyclePhase {
16 /// Component instance created, not yet mounted into the scene tree.
17 #[default]
18 Created,
19 /// Component rendered and attached to the retained scene graph.
20 Mounted,
21 /// Component or page is actively visible and executing reactive logic.
22 Active,
23 /// Component or page is hidden with reactive effects suspended (`PageRetention::Freeze`).
24 Frozen,
25 /// Component detached from the scene graph prior to final disposal.
26 Unmounted,
27 /// Component scope disposed and resources released.
28 Destroyed,
29}