[−][src]Trait num_traits::identities::One
Required methods
fn one() -> Self
Returns the multiplicative identity element of Self
, 1
.
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 mut
s.
Provided methods
fn set_one(&mut self)
Sets self
to the multiplicative identity element of Self
, 1
.
fn is_one(&self) -> bool where
Self: PartialEq,
Self: PartialEq,
Returns true
if self
is equal to the multiplicative identity.
For performance reasons, it's best to implement this manually.
After a semver bump, this method will be required, and the
where Self: PartialEq
bound will be removed.
Implementations on Foreign Types
impl One for usize
[src]
impl One for u8
[src]
impl One for u16
[src]
impl One for u32
[src]
impl One for u64
[src]
impl One for u128
[src]
impl One for isize
[src]
impl One for i8
[src]
impl One for i16
[src]
impl One for i32
[src]
impl One for i64
[src]
impl One for i128
[src]
impl One for f32
[src]
impl One for f64
[src]
impl<T: One> One for Wrapping<T> where
Wrapping<T>: Mul<Output = Wrapping<T>>,
[src]
Loading content...
Wrapping<T>: Mul<Output = Wrapping<T>>,