Skip to main content

CheckedDiv

Trait CheckedDiv 

Source
pub trait CheckedDiv<Rhs = Self>: Sized {
    // Required method
    fn checked_div(&self, rhs: &Rhs) -> CtOption<Self>;
}
Expand description

Checked division.

Required Methods§

Source

fn checked_div(&self, rhs: &Rhs) -> CtOption<Self>

Perform checked division, returning a CtOption which is_some only if the divisor is non-zero.

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 CheckedDiv for Limb

Source§

impl<Rhs: AsRef<UintRef>> CheckedDiv<Rhs> for BoxedUint

Available on crate feature alloc only.
Source§

impl<const LIMBS: usize, const RHS_LIMBS: usize> CheckedDiv<Int<RHS_LIMBS>> for Int<LIMBS>

Source§

impl<const LIMBS: usize, const RHS_LIMBS: usize> CheckedDiv<Uint<RHS_LIMBS>> for Uint<LIMBS>