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

Checked addition.

Required Methods§

source

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

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

Object Safety§

This trait is not object safe.

Implementors§

source§

impl CheckedAdd for BoxedUint

Available on crate feature alloc only.
source§

impl CheckedAdd for Limb

source§

impl<const LIMBS: usize> CheckedAdd for Uint<LIMBS>