pub trait ZeroOne: Sized {
// Required methods
fn zero() -> Self;
fn one() -> Self;
}
Expand description
A trait defining how to obtain 0 and 1 for every implementing type.
The boilerplate implementations for primitives is performed with a macro. If a primitive type is missing from this list, please open an issue to add it in.
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.