Trait modulo::Mod
[−]
[src]
pub trait Mod<RHS = Self> { type Output; fn modulo(self, rhs: RHS) -> Self::Output; }
Trait that describes modulo operation
Examples
use modulo::Mod; fn main() { assert_eq!(4, (-2).modulo(6)); assert_eq!(2, 9.modulo(7)); }
Associated Types
type Output
Required Methods
Implementors
impl<A, B, C> Mod<B> for A where
A: Rem<B, Output = C>,
B: Clone,
C: Add<B, Output = C> + Default + PartialOrd,