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

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

Checked substraction.

Required Associated Types§

source

type Output

Output type.

Required Methods§

source

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

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

Object Safety§

This trait is not object safe.

Implementors§

source§

impl CheckedSub for Limb

§

type Output = Limb

source§

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

§

type Output = UInt<LIMBS>