Trait num::One [] [src]

pub trait One: Mul<Self, Output = Self> {
    fn one() -> Self;
}

Defines a multiplicative identity element for Self.

Required Methods

Returns the multiplicative identity element of Self, 1.

Laws

a * 1 = a       ∀ a ∈ Self
1 * a = a       ∀ a ∈ Self

Purity

This function should return the same result at all times regardless of external mutable state, for example values stored in TLS or in static muts.

Implementors