Trait CheckedMul

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

Checked multiplication.

Required Methods§

Source

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

Perform checked multiplication, returning a CtOption which is_some only if the operation did not overflow.

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 CheckedMul for BoxedUint

Available on crate feature alloc only.
Source§

impl CheckedMul for Limb

Source§

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

Source§

impl<const LIMBS: usize, const RHS_LIMBS: usize> CheckedMul<Uint<RHS_LIMBS>> for Int<LIMBS>

Source§

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