pub struct GaugeElement {
pub value: f64,
pub min: Option<f64>,
pub max: Option<f64>,
pub label: Option<String>,
pub current_value_label: Option<String>,
pub tint: Option<ColorValue>,
pub color: Option<ColorValue>,
pub gauge_style: Option<GaugeStyle>,
pub style: ElementStyle,
}Expand description
Circular or capacity-style gauge.
Fields§
§value: f64Current value within [min, max].
min: Option<f64>Lower bound. Default 0.
max: Option<f64>Upper bound. Default 1.
label: Option<String>Optional caption.
current_value_label: Option<String>Text shown for the current value (e.g. "72%").
tint: Option<ColorValue>Accent color.
color: Option<ColorValue>Secondary / track color.
gauge_style: Option<GaugeStyle>Visual style (e.g. circular).
style: ElementStyleShared visual style (padding, background, frame, …).
Trait Implementations§
Source§impl Clone for GaugeElement
impl Clone for GaugeElement
Source§fn clone(&self) -> GaugeElement
fn clone(&self) -> GaugeElement
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 moreSource§impl Debug for GaugeElement
impl Debug for GaugeElement
Source§impl Default for GaugeElement
impl Default for GaugeElement
Source§fn default() -> GaugeElement
fn default() -> GaugeElement
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GaugeElement
impl<'de> Deserialize<'de> for GaugeElement
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<GaugeElement> for WidgetElement
impl From<GaugeElement> for WidgetElement
Source§fn from(value: GaugeElement) -> Self
fn from(value: GaugeElement) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for GaugeElement
impl JsonSchema for GaugeElement
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for GaugeElement
impl RefUnwindSafe for GaugeElement
impl Send for GaugeElement
impl Sync for GaugeElement
impl Unpin for GaugeElement
impl UnsafeUnpin for GaugeElement
impl UnwindSafe for GaugeElement
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