pub struct MetricSample {
pub unit: MetricUnit,
pub value: f64,
}Expand description
MetricSample
JSON schema
{
"type": "object",
"required": [
"unit",
"value"
],
"properties": {
"unit": {
"$ref": "#/components/schemas/MetricUnit"
},
"value": {
"type": "number",
"format": "double"
}
}
}Fields§
§unit: MetricUnit§value: f64Implementations§
Source§impl MetricSample
impl MetricSample
pub fn builder() -> MetricSample
Trait Implementations§
Source§impl Clone for MetricSample
impl Clone for MetricSample
Source§fn clone(&self) -> MetricSample
fn clone(&self) -> MetricSample
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 MetricSample
impl Debug for MetricSample
Source§impl<'de> Deserialize<'de> for MetricSample
impl<'de> Deserialize<'de> for MetricSample
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<&MetricSample> for MetricSample
impl From<&MetricSample> for MetricSample
Source§fn from(value: &MetricSample) -> Self
fn from(value: &MetricSample) -> Self
Converts to this type from the input type.
Source§impl From<MetricSample> for MetricSample
impl From<MetricSample> for MetricSample
Source§fn from(value: MetricSample) -> Self
fn from(value: MetricSample) -> Self
Converts to this type from the input type.
Source§impl Serialize for MetricSample
impl Serialize for MetricSample
Source§impl TryFrom<MetricSample> for MetricSample
impl TryFrom<MetricSample> for MetricSample
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: MetricSample) -> Result<Self, ConversionError>
fn try_from(value: MetricSample) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for MetricSample
impl RefUnwindSafe for MetricSample
impl Send for MetricSample
impl Sync for MetricSample
impl Unpin for MetricSample
impl UnsafeUnpin for MetricSample
impl UnwindSafe for MetricSample
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