pub trait Monoid {
type T: Clone;
// Required methods
fn identity_element() -> Self::T;
fn binary_operation(a: &Self::T, b: &Self::T) -> Self::T;
}Required Associated Types§
Required Methods§
fn identity_element() -> Self::T
fn binary_operation(a: &Self::T, b: &Self::T) -> Self::T
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.