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

Checked subtraction.

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 BoxedUint

Available on crate feature alloc only.
source§

impl CheckedSub for Limb

source§

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