Trait Aggregate

Source
pub trait Aggregate: Sized {
    // Required method
    fn merge(&mut self, other: Self);
}
Expand description

aka. Semigroup in Haskell-speak

Required Methods§

Source

fn merge(&mut self, other: Self)

Does not need to be commutative

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<T> Aggregate for Vec<T>

Source§

fn merge(&mut self, other: Self)

Implementors§