pub trait HasZero {
// Required methods
fn is_zero(&self) -> bool;
fn zero() -> Self;
}Expand description
A trait for types that have a zero value.
This is similar to the standard Zero trait, but that trait depends on Add and HasZero doesn’t.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".