pub trait AbstractMagma<O: Operator>: Sized + Clone {
// Required method
fn operate(&self, right: &Self) -> Self;
// Provided method
fn op(&self, _: O, lhs: &Self) -> Self { ... }
}
Expand description
A magma is an algebraic structure which consists of a set equipped with a binary operation, ∘, which must be closed.
§Closed binary operation
a, b ∈ Self ⇒ a ∘ b ∈ Self
Required Methods§
Provided Methods§
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.