Skip to main content

RemLimb

Trait RemLimb 

Source
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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl RemLimb for Limb

Source§

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