pub trait StrictSub: Sized + Sub<Self> {
// Required method
fn strict_sub(self, v: Self) -> <Self as Sub<Self>>::Output;
}Expand description
Performs subtraction that panics on overflow, even in release builds.
Required Methods§
Sourcefn strict_sub(self, v: Self) -> <Self as Sub<Self>>::Output
fn strict_sub(self, v: Self) -> <Self as Sub<Self>>::Output
Strict subtraction. Computes self - v, panicking on overflow
regardless of whether overflow checks are enabled.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".