pub enum Reaction {
Retry,
EmptyState,
Reconnect,
Fallback,
Diagnose,
}Expand description
How a CONSUMER must react to a raised facett UI error (Phase 2).
The shared reaction vocabulary: facett declares the CANONICAL reaction per code
(in REGISTRY) so every consumer — korp, nornir, dwarves, holger — agrees on
what a given failure means, and a consumer’s robot test asserts the REACTION
(never a string match):
assert_eq!(reaction_for("korp/cases:facet-map-2"), Reaction::EmptyState);A consumer may still choose a stricter local behaviour, but the canonical reaction is what the reaction-matrix tests pin — that is what makes ~150 (code × mount) assertions table-driven instead of hand-written.
Variants§
Retry
Transient load failure — RETRY. The source/tile/fetch did not complete; the consumer re-attempts (with backoff) and shows a retry affordance.
EmptyState
No data — show an HONEST EMPTY STATE. Not a failure of the machinery: the query/selection genuinely has nothing. The consumer must NOT show a blank pane; it shows “nothing here” plus what would fill it.
Reconnect
Backend connection is down — offer RECONNECT. The consumer surfaces the disconnected state and a reconnect action; it must not pretend to show data.
Fallback
Degraded but FUNCTIONAL — inform, do not alarm. A fast path (GPU) is absent and a slower correct path took over. The consumer notes it in diagnostics; the UI keeps working.
Diagnose
Internal/compute failure — DIAGNOSE. A solver diverged, a layout did not converge, a raster produced nothing. The consumer records a diagnostic with the code and surfaces a “something is wrong here” state to the operator.
Implementations§
Trait Implementations§
impl Copy for Reaction
Source§impl<'de> Deserialize<'de> for Reaction
impl<'de> Deserialize<'de> for Reaction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Reaction
impl StructuralPartialEq for Reaction
Auto Trait Implementations§
impl Freeze for Reaction
impl RefUnwindSafe for Reaction
impl Send for Reaction
impl Sync for Reaction
impl Unpin for Reaction
impl UnsafeUnpin for Reaction
impl UnwindSafe for Reaction
Blanket Implementations§
impl<T> Allocation for T
impl<T> AsId for T
impl<T> AsIdSalt for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more