pub trait CtCheckedSub: Sized {
// Required method
fn ct_checked_sub(&self, v: &Self) -> CtOption<Self>;
}Available on crate feature
ct only.Expand description
Constant-time checked subtraction (the masked counterpart of
CheckedSub).
Required Methods§
Sourcefn ct_checked_sub(&self, v: &Self) -> CtOption<Self>
fn ct_checked_sub(&self, v: &Self) -> CtOption<Self>
Computes self - v, returning a CtOption that is None-masked
on overflow.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".