num::traits

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: f32 = 1f32

Source§

impl ConstOne for f64

Source§

const ONE: f64 = 1f64

Source§

impl ConstOne for i8

Source§

const ONE: i8 = 1i8

Source§

impl ConstOne for i16

Source§

const ONE: i16 = 1i16

Source§

impl ConstOne for i32

Source§

const ONE: i32 = 1i32

Source§

impl ConstOne for i64

Source§

const ONE: i64 = 1i64

Source§

impl ConstOne for i128

Source§

const ONE: i128 = 1i128

Source§

impl ConstOne for isize

Source§

const ONE: isize = 1isize

Source§

impl ConstOne for u8

Source§

const ONE: u8 = 1u8

Source§

impl ConstOne for u16

Source§

const ONE: u16 = 1u16

Source§

impl ConstOne for u32

Source§

const ONE: u32 = 1u32

Source§

impl ConstOne for u64

Source§

const ONE: u64 = 1u64

Source§

impl ConstOne for u128

Source§

const ONE: u128 = 1u128

Source§

impl ConstOne for usize

Source§

const ONE: usize = 1usize

Source§

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

Source§

const ONE: Wrapping<T> = _

Implementors§