Skip to main content

euv_core/reactive/suspense/
enum.rs

1/// The phase of a `SuspenseState`.
2///
3/// - `Pending` — the underlying data is still loading.
4///   Render a fallback / spinner.
5/// - `Resolved(T)` — the data has loaded.
6///   Render the loaded content.
7/// - `Failed(String)` — the data load failed with the
8///   given message. Render an error boundary.
9#[derive(Clone, Debug)]
10pub enum SuspensePhase<T> {
11    /// The data is still loading.
12    Pending,
13    /// The data has loaded.
14    Resolved(T),
15    /// The data load failed; the message is for
16    /// debugging.
17    Failed(String),
18}