pub trait StrictAbs: Sized {
type Output;
// Required method
fn strict_abs(self) -> Self::Output;
}Expand description
Computes the absolute value, panicking on overflow even in release builds.
Required Associated Types§
Required Methods§
Sourcefn strict_abs(self) -> Self::Output
fn strict_abs(self) -> Self::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".