pub enum WorkloadState {
Unmonitored,
Healthy,
Strained,
Overloaded,
}Expand description
Coarse-grained workload classification, used for badge colouring
and warning surfaces. Computed from a UserLoad via
workload_state.
Variants§
Unmonitored
User has no capacity set; do not warn or colour.
Healthy
User is at most 80% of their capacity. Healthy.
Strained
User is between 80% and 100% of their capacity. Watch zone.
Overloaded
User is over 100% of their capacity. Warn.
Implementations§
Source§impl WorkloadState
impl WorkloadState
Sourcepub fn badge_class(&self) -> &'static str
pub fn badge_class(&self) -> &'static str
daisyUI badge class for rendering. Kept in core so any future read-only surface (email, CLI, alternate UI) can reuse the canonical palette.
Trait Implementations§
Source§impl Clone for WorkloadState
impl Clone for WorkloadState
Source§fn clone(&self) -> WorkloadState
fn clone(&self) -> WorkloadState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WorkloadState
Source§impl Debug for WorkloadState
impl Debug for WorkloadState
impl Eq for WorkloadState
Source§impl PartialEq for WorkloadState
impl PartialEq for WorkloadState
Source§fn eq(&self, other: &WorkloadState) -> bool
fn eq(&self, other: &WorkloadState) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for WorkloadState
Auto Trait Implementations§
impl Freeze for WorkloadState
impl RefUnwindSafe for WorkloadState
impl Send for WorkloadState
impl Sync for WorkloadState
impl Unpin for WorkloadState
impl UnsafeUnpin for WorkloadState
impl UnwindSafe for WorkloadState
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