Monoids, semigroups, and other algebraic structures in Rust