num_traits::identities

Trait ConstOne

Source
pub trait ConstOne: One {
    const ONE: Self;
}
Expand description

Defines an associated constant representing the multiplicative identity element for Self.

Required Associated Constants§

Source

const ONE: Self

The multiplicative identity element of Self, 1.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ConstOne for f32

Source§

const ONE: Self = 1f32

Source§

impl ConstOne for f64

Source§

const ONE: Self = 1f64

Source§

impl ConstOne for i8

Source§

const ONE: Self = 1i8

Source§

impl ConstOne for i16

Source§

const ONE: Self = 1i16

Source§

impl ConstOne for i32

Source§

const ONE: Self = 1i32

Source§

impl ConstOne for i64

Source§

const ONE: Self = 1i64

Source§

impl ConstOne for i128

Source§

const ONE: Self = 1i128

Source§

impl ConstOne for isize

Source§

const ONE: Self = 1isize

Source§

impl ConstOne for u8

Source§

const ONE: Self = 1u8

Source§

impl ConstOne for u16

Source§

const ONE: Self = 1u16

Source§

impl ConstOne for u32

Source§

const ONE: Self = 1u32

Source§

impl ConstOne for u64

Source§

const ONE: Self = 1u64

Source§

impl ConstOne for u128

Source§

const ONE: Self = 1u128

Source§

impl ConstOne for usize

Source§

const ONE: Self = 1usize

Source§

impl<T: ConstOne> ConstOne for Wrapping<T>
where Wrapping<T>: Mul<Output = Wrapping<T>>,

Source§

const ONE: Self

Implementors§