Trait stats::Commute [−][src]
pub trait Commute: Sized { fn merge(&mut self, other: Self); fn consume<I: Iterator<Item = Self>>(&mut self, other: I) { ... } }
Defines an interface for types that have an identity and can be commuted.
The value returned by Default::default must be its identity with respect
to the merge operation.
Required Methods
fn merge(&mut self, other: Self)
Merges the value other into self.
Provided Methods
fn consume<I: Iterator<Item = Self>>(&mut self, other: I)
Merges the values in the iterator into self.
Implementations on Foreign Types
impl<T: Commute> Commute for Option<T>[src]
impl<T: Commute> Commute for Option<T>impl<T: Commute, E> Commute for Result<T, E>[src]
impl<T: Commute, E> Commute for Result<T, E>impl<T: Commute> Commute for Vec<T>[src]
impl<T: Commute> Commute for Vec<T>Implementors
impl<T: Eq + Hash> Commute for Frequencies<T>impl<T: PartialOrd> Commute for MinMax<T>impl Commute for OnlineStatsimpl<T: PartialOrd> Commute for Unsorted<T>