Trait One

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

Provides the constant 1.

Required Associated Constants§

Source

const ONE: Self

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 One for f32

The constant 1.

Source§

const ONE: f32 = 1f32

Source§

impl One for f64

The constant 1.

Source§

const ONE: f64 = 1f64

Source§

impl One for i8

The constant 1.

§Examples

See here.

Source§

const ONE: i8 = 1i8

Source§

impl One for i16

The constant 1.

§Examples

See here.

Source§

const ONE: i16 = 1i16

Source§

impl One for i32

The constant 1.

§Examples

See here.

Source§

const ONE: i32 = 1i32

Source§

impl One for i64

The constant 1.

§Examples

See here.

Source§

const ONE: i64 = 1i64

Source§

impl One for i128

The constant 1.

§Examples

See here.

Source§

const ONE: i128 = 1i128

Source§

impl One for isize

The constant 1.

§Examples

See here.

Source§

const ONE: isize = 1isize

Source§

impl One for u8

The constant 1.

§Examples

See here.

Source§

const ONE: u8 = 1u8

Source§

impl One for u16

The constant 1.

§Examples

See here.

Source§

const ONE: u16 = 1u16

Source§

impl One for u32

The constant 1.

§Examples

See here.

Source§

const ONE: u32 = 1u32

Source§

impl One for u64

The constant 1.

§Examples

See here.

Source§

const ONE: u64 = 1u64

Source§

impl One for u128

The constant 1.

§Examples

See here.

Source§

const ONE: u128 = 1u128

Source§

impl One for usize

The constant 1.

§Examples

See here.

Source§

const ONE: usize = 1usize

Source§

impl One for NonZero<i8>

Source§

impl One for NonZero<i16>

Source§

impl One for NonZero<i32>

Source§

impl One for NonZero<i64>

Source§

impl One for NonZero<i128>

Source§

impl One for NonZero<isize>

Source§

impl One for NonZero<u8>

Source§

impl One for NonZero<u16>

Source§

impl One for NonZero<u32>

Source§

impl One for NonZero<u64>

Source§

impl One for NonZero<u128>

Source§

impl One for NonZero<usize>

Implementors§

Source§

impl One for Integer

The constant 1.

Source§

impl One for Natural

The constant 1.

Source§

impl One for Rational

The constant 1.