pub trait Abs {
// Required method
const fn abs(self) -> Self;
}
Expand description
✅ The absolute value of self
.
§Panics
This function never panics. If the value is the minimum representable number, it returns the
nearest valid value (e.g. Self::MAX
).
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.