pub trait One: Sized + Mul<Self, Output = Self> {
fn one() -> Self;
}
Defines a multiplicative identity element for Self
.
Required Methods
fn one() -> Self
Returns the multiplicative identity element of Self
, 1
.
a * 1 = a ∀ a ∈ Self
1 * a = a ∀ a ∈ Self
This function should return the same result at all times regardless of external mutable state, for example values stored in TLS or in static mut
s.
Implementors
impl One for usize
impl One for u8
impl One for u16
impl One for u32
impl One for u64
impl One for isize
impl One for i8
impl One for i16
impl One for i32
impl One for i64
impl One for f32
impl One for f64