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", so 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>