pub enum GaugeStyle {
Show 16 variants
Linear,
Bullet,
Arc,
Segmented,
Dial,
Meter,
Reticle,
Ring,
Chevron,
Smooth,
Dots,
Led,
Battery,
Level,
Thermometer,
Signal,
}Expand description
Visual form of a Gauge.
Variants§
Linear
Full-thickness bar over a dim band track.
Bullet
Bullet chart: bands as background, thin value bar in the middle.
Arc
Semicircular dial drawn with braille dots: banded ring, ticks, needle, target notch, min/max scale labels and the value label underneath.
Segmented
Discrete blocks (htop / battery style); lit blocks take the band color.
Dial
Full-circle-ish dial (270°): banded ring, ticks, needle and value readout.
Meter
Half-circle meter with a needle and the readout underneath.
Reticle
Sci-fi reticle: ring with tick marks, inner dashed ring and crosshair.
Ring
Full ring (360°) filling clockwise, value in the hole.
Chevron
Row of chevron cells (❯), lit up to the value.
Smooth
Smooth sub-cell bar with a rounded end.
Dots
Row of round dots, lit up to the value.
Led
LED strip: lit segments take the band color, unlit ones are dim.
Battery
Battery outline with a terminal nub and a charge fill.
Level
Vertical liquid level in a tank, with a wavy surface.
Thermometer
Vertical thermometer with a bulb.
Signal
Rising signal bars (like a phone’s reception indicator).
Implementations§
Source§impl GaugeStyle
impl GaugeStyle
Sourcepub const ALL: [GaugeStyle; 16]
pub const ALL: [GaugeStyle; 16]
Every gauge style.
Sourcepub const fn preferred_size(self) -> (u16, u16)
pub const fn preferred_size(self) -> (u16, u16)
A good (width, height) in cells for this style.
Trait Implementations§
Source§impl Clone for GaugeStyle
impl Clone for GaugeStyle
impl Copy for GaugeStyle
Source§impl Debug for GaugeStyle
impl Debug for GaugeStyle
Source§impl Default for GaugeStyle
impl Default for GaugeStyle
Source§impl<'de> Deserialize<'de> for GaugeStyle
impl<'de> Deserialize<'de> for GaugeStyle
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 GaugeStyle
Source§impl PartialEq for GaugeStyle
impl PartialEq for GaugeStyle
Source§impl Serialize for GaugeStyle
impl Serialize for GaugeStyle
impl StructuralPartialEq for GaugeStyle
Auto Trait Implementations§
impl Freeze for GaugeStyle
impl RefUnwindSafe for GaugeStyle
impl Send for GaugeStyle
impl Sync for GaugeStyle
impl Unpin for GaugeStyle
impl UnsafeUnpin for GaugeStyle
impl UnwindSafe for GaugeStyle
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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