pub struct Meter { /* private fields */ }Expand description
A load ratio in 0.0..=1.0, mapped to a green→yellow→red color ramp.
Low load is green, mid load yellow, high load red. Values outside the
range are clamped. Delegates to Color::lerp (backed by gem) rather
than hand-rolling RGB interpolation.
Not a drawing widget – there’s no Terminal
involved, just a ratio-to-color mapping – but kept as its own small
struct rather than a free function so Gauge,
StatBar, and Sparkline share
one place that owns the ramp.
Implementations§
Trait Implementations§
impl Copy for Meter
impl StructuralPartialEq for Meter
Auto Trait Implementations§
impl Freeze for Meter
impl RefUnwindSafe for Meter
impl Send for Meter
impl Sync for Meter
impl Unpin for Meter
impl UnsafeUnpin for Meter
impl UnwindSafe for Meter
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