pub struct TimeSeries {
pub num_points: usize,
pub mode: TimeSeriesMode,
/* private fields */
}Expand description
Time-series accumulator: stores scalar/1D values from successive arrays.
Fields§
§num_points: usize§mode: TimeSeriesModeImplementations§
Source§impl TimeSeries
impl TimeSeries
pub fn new(num_points: usize, mode: TimeSeriesMode) -> Self
Sourcepub fn add_value(&mut self, value: f64)
pub fn add_value(&mut self, value: f64)
Add a value (e.g., mean of an array) to the time series.
pub fn count(&self) -> usize
pub fn reset(&mut self)
Sourcepub fn set_mode(&mut self, mode: TimeSeriesMode)
pub fn set_mode(&mut self, mode: TimeSeriesMode)
Change the accumulation mode. Resets all data.
Auto Trait Implementations§
impl Freeze for TimeSeries
impl RefUnwindSafe for TimeSeries
impl Send for TimeSeries
impl Sync for TimeSeries
impl Unpin for TimeSeries
impl UnsafeUnpin for TimeSeries
impl UnwindSafe for TimeSeries
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more