pub trait Mod<RHS = Self> {
type Output;
// Required method
fn modulo(self, rhs: RHS) -> Self::Output;
}
Expand description
Trait that describes modulo operation
§Examples
use modulo::Mod;
fn main() {
assert_eq!(4, (-2).modulo(6));
assert_eq!(2, 9.modulo(7));
}