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 NonZeroI8

Source§

const ONE: Self

Source§

impl One for NonZeroI16

Source§

const ONE: Self

Source§

impl One for NonZeroI32

Source§

const ONE: Self

Source§

impl One for NonZeroI64

Source§

const ONE: Self

Source§

impl One for NonZeroI128

Source§

const ONE: Self

Source§

impl One for NonZeroIsize

Source§

const ONE: Self

Source§

impl One for NonZeroU8

Source§

const ONE: Self

Source§

impl One for NonZeroU16

Source§

const ONE: Self

Source§

impl One for NonZeroU32

Source§

const ONE: Self

Source§

impl One for NonZeroU64

Source§

const ONE: Self

Source§

impl One for NonZeroU128

Source§

const ONE: Self

Source§

impl One for NonZeroUsize

Source§

const ONE: Self

Implementors§