pub trait Zero: Sized + Add<Output = Self> {
// Required methods
fn zero() -> Self;
fn is_zero(&self) -> bool;
// Provided method
fn set_zero(&mut self) { ... }
}
Expand description
Complete re-export of num-traits for SciRS2 ecosystem
Defines an additive identity element for Self
.
§Laws
a + 0 = a ∀ a ∈ Self
0 + a = a ∀ a ∈ Self
Required Methods§
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.