pub trait StrictSub: Sized {
type Output;
// Required method
fn strict_sub(self, v: Self) -> Self::Output;
}Expand description
Performs subtraction that panics on overflow, even in release builds.
Required Associated Types§
Required Methods§
Sourcefn strict_sub(self, v: Self) -> Self::Output
fn strict_sub(self, v: Self) -> 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".