Trait num_traits::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.

Implementations on Foreign Types

impl One for f64
[src]

[src]

impl One for i16
[src]

[src]

impl<T> One for Wrapping<T> where
    T: One,
    Wrapping<T>: Mul<Wrapping<T>>,
    <Wrapping<T> as Mul<Wrapping<T>>>::Output == Wrapping<T>, 
[src]

[src]

impl One for i32
[src]

[src]

impl One for f32
[src]

[src]

impl One for usize
[src]

[src]

impl One for isize
[src]

[src]

impl One for i64
[src]

[src]

impl One for i8
[src]

[src]

impl One for u32
[src]

[src]

impl One for u16
[src]

[src]

impl One for u8
[src]

[src]

impl One for u64
[src]

[src]

Implementors