pub struct StatValue {
pub float_numerator_val: Option<f64>,
pub float_denominator_val: Option<f64>,
pub int_numerator_val: Option<i64>,
pub int_denominator_val: Option<i64>,
pub string_val: Option<String>,
pub bool_val: Option<bool>,
pub unit: Option<String>,
pub desc: Option<String>,
}
Expand description
StatValue exposes the values of a particular statistic. The value may be of type float, integer, string or boolean. Numeric types can be exposed as a single value or as a fraction.
This struct was generated based on the Go types of the official Nomad API.
Fields§
§float_numerator_val: Option<f64>
FloatNumeratorVal exposes a floating point value. If denominator is set it is assumed to be a fractional value, otherwise it is a scalar.
float_denominator_val: Option<f64>
§int_numerator_val: Option<i64>
IntNumeratorVal exposes a int value. If denominator is set it is assumed to be a fractional value, otherwise it is a scalar.
int_denominator_val: Option<i64>
§string_val: Option<String>
StringVal exposes a string value. These are likely annotations.
bool_val: Option<bool>
BoolVal exposes a boolean statistic.
unit: Option<String>
Unit gives the unit type: °F, %, MHz, MB, etc.
desc: Option<String>
Desc provides a human readable description of the statistic.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for StatValue
impl<'de> Deserialize<'de> for StatValue
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
impl StructuralPartialEq for StatValue
Auto Trait Implementations§
impl Freeze for StatValue
impl RefUnwindSafe for StatValue
impl Send for StatValue
impl Sync for StatValue
impl Unpin for StatValue
impl UnwindSafe for StatValue
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