pub trait MulMonoid:
MulMagma
+ One
+ Associative { }Expand description
Represents a Multiplicative Monoid.
A monoid is an algebraic structure with a single associative binary
operation and an identity element. A multiplicative monoid is one where the
operation is multiplication (*).
§Mathematical Definition
A set S with a binary operation * is a multiplicative monoid if it satisfies:
- Closure:
a * bis inS. (Implicit in Rust). - Associativity:
(a * b) * c = a * (b * c)for alla, b, cinS. (A property the implementor must uphold). - Identity Element: There exists an element
1inSsuch thata * 1 = 1 * a = afor allainS. (Provided by theOnetrait).
The Clone and MulAssign bounds are included for practical purposes.
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.