pub trait Zero {
// Required methods
fn zero() -> Self;
fn cmp_zero(&self) -> Option<Ordering>;
}Expand description
The trait to define scalar (single-dimension) types with a dedicated origin (zero) point.
Currently, it is blanket-implemented for all types that implement TryFrom<u8>,
which covers at least all core primitive numeric types
(like iN, uN and fN where N is the size in bits).
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.