#[non_exhaustive]pub struct Point {
pub interval: Option<TimeInterval>,
pub value: Option<TypedValue>,
/* private fields */
}Expand description
A single data point in a time series.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.interval: Option<TimeInterval>The time interval to which the data point applies. For GAUGE metrics,
the start time is optional, but if it is supplied, it must equal the
end time. For DELTA metrics, the start
and end time should specify a non-zero interval, with subsequent points
specifying contiguous and non-overlapping intervals. For CUMULATIVE
metrics, the start and end time should specify a non-zero interval, with
subsequent points specifying the same start time and increasing end times,
until an event resets the cumulative value to zero and sets a new start
time for the following points.
value: Option<TypedValue>The value of the data point.
Implementations§
Source§impl Point
impl Point
pub fn new() -> Self
Sourcepub fn set_interval<T>(self, v: T) -> Selfwhere
T: Into<TimeInterval>,
pub fn set_interval<T>(self, v: T) -> Selfwhere
T: Into<TimeInterval>,
Sets the value of interval.
Sourcepub fn set_or_clear_interval<T>(self, v: Option<T>) -> Selfwhere
T: Into<TimeInterval>,
pub fn set_or_clear_interval<T>(self, v: Option<T>) -> Selfwhere
T: Into<TimeInterval>,
Sets or clears the value of interval.
Sourcepub fn set_value<T>(self, v: T) -> Selfwhere
T: Into<TypedValue>,
pub fn set_value<T>(self, v: T) -> Selfwhere
T: Into<TypedValue>,
Sets the value of value.
Sourcepub fn set_or_clear_value<T>(self, v: Option<T>) -> Selfwhere
T: Into<TypedValue>,
pub fn set_or_clear_value<T>(self, v: Option<T>) -> Selfwhere
T: Into<TypedValue>,
Sets or clears the value of value.