Sample

Trait Sample 

Source
pub trait Sample:
    Clone
    + Debug
    + Default {
    type Value;

    // Required methods
    fn new(timestamp: DateTime<Utc>, value: Option<Self::Value>) -> Self;
    fn timestamp(&self) -> DateTime<Utc>;
    fn value(&self) -> Option<Self::Value>;
}
Expand description

The Sample trait represents a single sample in a time series.

Required Associated Types§

Required Methods§

Source

fn new(timestamp: DateTime<Utc>, value: Option<Self::Value>) -> Self

Source

fn timestamp(&self) -> DateTime<Utc>

Source

fn value(&self) -> Option<Self::Value>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§