pub enum PanelState<T: Serialize> {
Live {
data: T,
},
NotImplemented {
missing: Vec<&'static str>,
},
Unreachable {
reason: String,
},
}Expand description
The tri-state envelope every panel answers in.
plan/ops-dashboard.md sets one rule above everything else it asks for:
never display invented data as if it were real. A panel says which of
these three it is rather than leaving a client to infer it from shape,
and only PanelState::Live carries any values at all.
Generic over the live payload so each panel keeps its own honest shape;
the three variant names are what a client (and
crate::dashboard::tests::panel_state_never_carries_numbers_without_a_backing_capability)
reads.
Variants§
Live
A real capability, read fresh from this process’s own state.
Fields
data: TThe real values. The only variant that carries any.
NotImplemented
The epic this panel needs does not exist yet.
Fields
Unreachable
A real capability whose read did not answer. Distinct from a live panel reporting zero, which is a different fact.
Trait Implementations§
Source§impl<T: Clone + Serialize> Clone for PanelState<T>
impl<T: Clone + Serialize> Clone for PanelState<T>
Source§fn clone(&self) -> PanelState<T>
fn clone(&self) -> PanelState<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> Freeze for PanelState<T>where
T: Freeze,
impl<T> RefUnwindSafe for PanelState<T>where
T: RefUnwindSafe,
impl<T> Send for PanelState<T>where
T: Send,
impl<T> Sync for PanelState<T>where
T: Sync,
impl<T> Unpin for PanelState<T>where
T: Unpin,
impl<T> UnsafeUnpin for PanelState<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for PanelState<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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