Trait PyMod

Source
pub trait PyMod<Rhs> {
    type Output;

    // Required method
    fn pymod(self, rhs: Rhs) -> Self::Output;
}
Expand description

A trait for modular arithmetic; the algorithm is based on the Python % operator which uses the sign of the denominator rather than the numerator.

Required Associated Types§

Required Methods§

Source

fn pymod(self, rhs: Rhs) -> Self::Output

Implementors§

Source§

impl<A, B, C> PyMod<B> for A
where A: Rem<B, Output = C>, B: Copy + Zero + PartialOrd, C: Add<B, Output = C> + Zero + PartialOrd,