Skip to main content

CheckedMul

Trait CheckedMul 

pub trait CheckedMul<Rhs = Self>: Sized {
    type Output;

    // Required method
    fn checked_mul(&self, rhs: Rhs) -> CtOption<Self>;
}
Expand description

Checked multiplication.

Required Associated Types§

type Output

Output type.

Required Methods§

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§

§

impl CheckedMul for Limb

§

type Output = Limb

§

impl<const LIMBS: usize, const HLIMBS: usize> CheckedMul<&Uint<HLIMBS>> for Uint<LIMBS>

§

type Output = Uint<LIMBS>