pub trait One { fn one() -> Self; }
Types that have a "one" value.
This trait is intended for use in conjunction with Mul
, as an identity: x * T::one() == x
.
fn one() -> Self
The "one" (usually, multiplicative identity) for this type.
impl One for u8
impl One for u16
impl One for u32
impl One for u64
impl One for usize
impl One for i8
impl One for i16
impl One for i32
impl One for i64
impl One for isize
impl One for u128
impl One for i128
impl One for f32
impl One for f64
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/num/trait.One.html