DivRemLimb

Trait DivRemLimb 

Source
pub trait DivRemLimb: Sized {
    // Required method
    fn div_rem_limb_with_reciprocal(
        &self,
        reciprocal: &Reciprocal,
    ) -> (Self, Limb);

    // Provided method
    fn div_rem_limb(&self, rhs: NonZero<Limb>) -> (Self, Limb) { ... }
}
Expand description

Support for optimized division by a single limb.

Required Methods§

Source

fn div_rem_limb_with_reciprocal(&self, reciprocal: &Reciprocal) -> (Self, Limb)

Computes self / rhs, returns the quotient (q) and remainder (r).

Provided Methods§

Source

fn div_rem_limb(&self, rhs: NonZero<Limb>) -> (Self, Limb)

Computes self / rhs using a pre-made reciprocal, returns the quotient (q) and remainder (r).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<const LIMBS: usize> DivRemLimb for Uint<LIMBS>