pub trait StrictAbs: Sized + Neg {
// Required method
fn strict_abs(self) -> <Self as Neg>::Output;
}Expand description
Computes the absolute value, panicking on overflow even in release builds.
Required Methods§
Sourcefn strict_abs(self) -> <Self as Neg>::Output
fn strict_abs(self) -> <Self as Neg>::Output
Strict absolute value. Computes self.abs(), panicking for
MIN.strict_abs() (the result can’t be represented).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".