Trait MovingWindowValue

Source
pub trait MovingWindowValue: Copy + Debug {
    // Required methods
    fn zero() -> Self;
    fn add_assign(target: &mut Self, value: Self);
    fn sub_assign(target: &mut Self, value: Self);
    fn average(total: Self, divisor: usize) -> Self;
}

Required Methods§

Source

fn zero() -> Self

Source

fn add_assign(target: &mut Self, value: Self)

Source

fn sub_assign(target: &mut Self, value: Self)

Source

fn average(total: Self, divisor: usize) -> Self

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.

Implementations on Foreign Types§

Source§

impl MovingWindowValue for f64

Source§

fn zero() -> Self

Source§

fn add_assign(target: &mut Self, value: Self)

Source§

fn sub_assign(target: &mut Self, value: Self)

Source§

fn average(total: Self, divisor: usize) -> Self

Source§

impl MovingWindowValue for Duration

Source§

fn zero() -> Self

Source§

fn add_assign(target: &mut Self, value: Self)

Source§

fn sub_assign(target: &mut Self, value: Self)

Source§

fn average(total: Self, divisor: usize) -> Self

Implementors§