pub trait RemLimb: Sized {
    // Required method
    fn rem_limb_with_reciprocal(&self, reciprocal: &Reciprocal) -> Limb;

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

Support for optimized division by a single limb.

Required Methods§

source

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

Computes self % rhs.

Provided Methods§

source

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

Computes self % rhs using a pre-made reciprocal.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl RemLimb for BoxedUint

Available on crate feature alloc only.
source§

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