Trait CheckedAdd

Source
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.

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

Available on crate feature alloc only.
Source§

impl CheckedAdd for Limb

Source§

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

Source§

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