pub trait One: Sized + Mul<Output = Self> {
// Required method
fn one() -> Self;
// Provided methods
fn set_one(&mut self) { ... }
fn is_one(&self) -> bool
where Self: PartialEq { ... }
}
Expand description
Complete re-export of num-traits for SciRS2 ecosystem
Defines a multiplicative identity element for Self
.
§Laws
a * 1 = a ∀ a ∈ Self
1 * 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.