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

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

Checked addition.

Required Associated Types§

source

type Output

Output type.

Required Methods§

source

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

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

Implementors§

source§

impl CheckedAdd<Limb> for Limb

§

type Output = Limb

source§

impl<const LIMBS: usize> CheckedAdd<&UInt<LIMBS>> for UInt<LIMBS>

§

type Output = UInt<LIMBS>