pub enum Status {
Ok,
Warning,
Critical,
Unknown,
}Expand description
How healthy a value is, for a KpiCard.
Each status is a symbol, a word and a colour, so it reads without colour:
| Status | Symbol | ASCII | Word | Theme key |
|---|---|---|---|---|
Ok | ✓ | + | ok | chart.ok |
Warning | ! | ! | warning | chart.warning |
Critical | ✗ | x | critical | chart.critical |
Unknown | ? | ? | unknown | chart.unknown |
use rich_ext::chart::Status;
assert_eq!(Status::Critical.text(false), "✗ critical");
assert_eq!(Status::Critical.text(true), "x critical");Variants§
Ok
Within its limits.
Warning
Needs a look.
Critical
Out of its limits.
Unknown
Not known (no data, or not checked).
Implementations§
Trait Implementations§
impl Copy for Status
impl Eq for Status
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnsafeUnpin for Status
impl UnwindSafe for Status
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.