#[non_exhaustive]pub struct MetricsQueryUnit {
pub family: Option<String>,
pub name: Option<String>,
pub plural: Option<String>,
pub scale_factor: Option<f64>,
pub short_name: Option<String>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Object containing the metric unit family, scale factor, name, and short name.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.family: Option<String>
Unit family, allows for conversion between units of the same family, for scaling.
name: Option<String>
Unit name
plural: Option<String>
Plural form of the unit name.
scale_factor: Option<f64>
Factor for scaling between units of the same family.
short_name: Option<String>
Abbreviation of the unit.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl MetricsQueryUnit
impl MetricsQueryUnit
pub fn new() -> MetricsQueryUnit
pub fn family(self, value: String) -> Self
pub fn name(self, value: String) -> Self
pub fn plural(self, value: String) -> Self
pub fn scale_factor(self, value: f64) -> Self
pub fn short_name(self, value: String) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for MetricsQueryUnit
impl Clone for MetricsQueryUnit
Source§fn clone(&self) -> MetricsQueryUnit
fn clone(&self) -> MetricsQueryUnit
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 MetricsQueryUnit
impl Debug for MetricsQueryUnit
Source§impl Default for MetricsQueryUnit
impl Default for MetricsQueryUnit
Source§impl<'de> Deserialize<'de> for MetricsQueryUnit
impl<'de> Deserialize<'de> for MetricsQueryUnit
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 PartialEq for MetricsQueryUnit
impl PartialEq for MetricsQueryUnit
Source§impl Serialize for MetricsQueryUnit
impl Serialize for MetricsQueryUnit
impl StructuralPartialEq for MetricsQueryUnit
Auto Trait Implementations§
impl Freeze for MetricsQueryUnit
impl RefUnwindSafe for MetricsQueryUnit
impl Send for MetricsQueryUnit
impl Sync for MetricsQueryUnit
impl Unpin for MetricsQueryUnit
impl UnwindSafe for MetricsQueryUnit
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