pub trait Abs:
Neg<Output = Self>
+ Ord
+ Zero {
// Provided method
fn abs(self) -> Self { ... }
}Expand description
Absolute value of a number.
Automatically implemented for all types satisfying the trait’s bounds.
Provided 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.