Struct sosistab::TimeSeries
source · pub struct TimeSeries { /* private fields */ }
Expand description
A time-series that is just a time-indexed vector of f32s that automatically decimates and compacts old data.
Implementations§
source§impl TimeSeries
impl TimeSeries
sourcepub fn iter(&self) -> impl Iterator<Item = (&SystemTime, &f32)>
pub fn iter(&self) -> impl Iterator<Item = (&SystemTime, &f32)>
Get an iterator over the elements
sourcepub fn after(&self, time: SystemTime) -> Self
pub fn after(&self, time: SystemTime) -> Self
Restricts the time series to points after a certain time.
sourcepub fn get(&self, time: SystemTime) -> f32
pub fn get(&self, time: SystemTime) -> f32
Get the value at a certain time.
sourcepub fn earliest(&self) -> Option<(SystemTime, f32)>
pub fn earliest(&self) -> Option<(SystemTime, f32)>
Get the earliest time.
Trait Implementations§
source§impl Clone for TimeSeries
impl Clone for TimeSeries
source§fn clone(&self) -> TimeSeries
fn clone(&self) -> TimeSeries
Returns a copy 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 TimeSeries
impl Debug for TimeSeries
source§impl Default for TimeSeries
impl Default for TimeSeries
source§fn default() -> TimeSeries
fn default() -> TimeSeries
Returns the “default value” for a type. Read more