ConstOne

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 = 1.0

Source§

impl ConstOne for f64

Source§

const ONE: Self = 1.0

Source§

impl ConstOne for i8

Source§

const ONE: Self = 1

Source§

impl ConstOne for i16

Source§

const ONE: Self = 1

Source§

impl ConstOne for i32

Source§

const ONE: Self = 1

Source§

impl ConstOne for i64

Source§

const ONE: Self = 1

Source§

impl ConstOne for i128

Source§

const ONE: Self = 1

Source§

impl ConstOne for isize

Source§

const ONE: Self = 1

Source§

impl ConstOne for u8

Source§

const ONE: Self = 1

Source§

impl ConstOne for u16

Source§

const ONE: Self = 1

Source§

impl ConstOne for u32

Source§

const ONE: Self = 1

Source§

impl ConstOne for u64

Source§

const ONE: Self = 1

Source§

impl ConstOne for u128

Source§

const ONE: Self = 1

Source§

impl ConstOne for usize

Source§

const ONE: Self = 1

Source§

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

Source§

const ONE: Self

Implementors§