pub trait DivExact<Rhs, Precompute>: Sized {
    type Output;

    fn div_exact(self, d: Rhs, pre: &Precompute) -> Option<Self::Output>;
}
Expand description

Utility function for exact division, with precomputed helper values

Available Pre-computation types:

  • (): No pre-computation, the implementation relies on native integer division
  • PreInv: With Pre-computed modular inverse

Required Associated Types

Required Methods

Check if d divides self with the help of the precomputation. If d divides self, then the quotient is returned.

Implementations on Foreign Types

Implementors