Trait crypto_bigint::prelude::CheckedSub
source · 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§
Required Methods§
sourcefn checked_sub(&self, rhs: Rhs) -> CtOption<Self>
fn checked_sub(&self, rhs: Rhs) -> CtOption<Self>
Perform checked subtraction, returning a CtOption
which is_some
only if the operation did not underflow.