pub trait Ring:
AdditiveGroup
+ MultiplicativeMonoid
+ MulAdd<Self, Self, Output = Self>
+ MulAddAssign<Self, Self>
+ Debug {
// Provided methods
fn two() -> Self { ... }
fn three() -> Self { ... }
fn four() -> Self { ... }
fn five() -> Self { ... }
fn six() -> Self { ... }
fn seven() -> Self { ... }
fn eight() -> Self { ... }
fn nine() -> Self { ... }
fn ten() -> Self { ... }
}Expand description
Interface for a ring as a combination of an additive group and a distributive multiplication operation.
This is basically the base “scalar” trait (a Module is defined over a Ring).
Here we also add the Debug trait as a constraint because basically all scalars
should implement Debug, and this avoids us needing to explicitly give a Debug
constraint when using functions or macros like assert_eq that require it.
Provided Methods§
fn two() -> Self
fn three() -> Self
fn four() -> Self
fn five() -> Self
fn six() -> Self
fn seven() -> Self
fn eight() -> Self
fn nine() -> Self
fn ten() -> Self
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.