PyMod

Trait PyMod 

Source
pub trait PyMod<Rhs = Self> {
    type Output;

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

PyMod is a modulo operator inspired by Python’s % operator, which handles negative values differently than rust’s built-in % operator. Specifically, the sign of the result will always match the sign of the divisor.

Required Associated Types§

Required Methods§

Source

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

Implementors§

Source§

impl<A, B, C> PyMod<B> for A
where B: OrderedNum, C: OrderedNum<Output = C> + Add<B>, A: for<'a> Rem<&'a B, Output = C>,