#[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
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.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>,
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>,
Sourcepub fn set_value<T>(self, v: T) -> Selfwhere
T: Into<TypedValue>,
pub fn set_value<T>(self, v: T) -> Selfwhere
T: Into<TypedValue>,
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>,
Trait Implementations§
impl StructuralPartialEq for Point
Auto Trait Implementations§
impl Freeze for Point
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnwindSafe for Point
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