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§
Sourcefn div_rem_limb_with_reciprocal(&self, reciprocal: &Reciprocal) -> (Self, Limb)
fn div_rem_limb_with_reciprocal(&self, reciprocal: &Reciprocal) -> (Self, Limb)
Computes self / rhs
, returns the quotient (q) and remainder (r).
Provided Methods§
Sourcefn div_rem_limb(&self, rhs: NonZero<Limb>) -> (Self, Limb)
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§
impl DivRemLimb for BoxedUint
Available on crate feature
alloc
only.