pub struct GaugePaneData {
pub value: f64,
pub thresholds: Vec<ThresholdConfig>,
pub error: Option<String>,
}Expand description
Data to display in a gauge pane.
Fields§
§value: f64Current value
thresholds: Vec<ThresholdConfig>Thresholds for coloring
error: Option<String>Error message if fetch failed
Implementations§
Source§impl GaugePaneData
impl GaugePaneData
Sourcepub fn with_value(value: f64) -> Self
pub fn with_value(value: f64) -> Self
Create gauge data with a value.
Sourcepub fn with_error(message: impl Into<String>) -> Self
pub fn with_error(message: impl Into<String>) -> Self
Create error result.
Sourcepub fn threshold(self, threshold: ThresholdConfig) -> Self
pub fn threshold(self, threshold: ThresholdConfig) -> Self
Add a threshold.
Trait Implementations§
Source§impl Clone for GaugePaneData
impl Clone for GaugePaneData
Source§fn clone(&self) -> GaugePaneData
fn clone(&self) -> GaugePaneData
Returns a duplicate of the value. Read more
1.0.0 · 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 GaugePaneData
impl Debug for GaugePaneData
Source§impl Default for GaugePaneData
impl Default for GaugePaneData
Source§impl PartialEq for GaugePaneData
impl PartialEq for GaugePaneData
impl StructuralPartialEq for GaugePaneData
Auto Trait Implementations§
impl Freeze for GaugePaneData
impl RefUnwindSafe for GaugePaneData
impl Send for GaugePaneData
impl Sync for GaugePaneData
impl Unpin for GaugePaneData
impl UnsafeUnpin for GaugePaneData
impl UnwindSafe for GaugePaneData
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<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>
Converts
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>
Converts
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