Trait FenwickTreeValue

Source
pub trait FenwickTreeValue:
    Default
    + Clone
    + PartialEq {
    // Required methods
    fn store_value(&mut self, other: &Self);
    fn substract(self, other: Self) -> Self;
}
Expand description

Types that implement that trait can be stored and aggregated within Fenwick tree.

Required Methods§

Source

fn store_value(&mut self, other: &Self)

Source

fn substract(self, other: Self) -> 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.

Implementors§

Source§

impl<T> FenwickTreeValue for T
where T: Default + Copy + AddAssign + Sub<Output = Self> + PartialEq,