Trait num::traits::One [] [src]

pub trait One: 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.

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