Skip to main content

One

Trait One 

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

Types equipped with a multiplicative identity (i.e., one).

Required Associated Constants§

Source

const ONE: Self

Additive identity (i.e., one).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl One for f32

Source§

const ONE: Self = 1.

Source§

impl One for f64

Source§

const ONE: Self = 1.

Source§

impl One for i8

Source§

const ONE: Self = 1

Source§

impl One for i16

Source§

const ONE: Self = 1

Source§

impl One for i32

Source§

const ONE: Self = 1

Source§

impl One for i64

Source§

const ONE: Self = 1

Source§

impl One for i128

Source§

const ONE: Self = 1

Source§

impl One for isize

Source§

const ONE: Self = 1

Source§

impl One for u8

Source§

const ONE: Self = 1

Source§

impl One for u16

Source§

const ONE: Self = 1

Source§

impl One for u32

Source§

const ONE: Self = 1

Source§

impl One for u64

Source§

const ONE: Self = 1

Source§

impl One for u128

Source§

const ONE: Self = 1

Source§

impl One for usize

Source§

const ONE: Self = 1

Implementors§

Source§

impl<T: One + PartialOrd + Zero + Debug> One for NonNegative<T>

Source§

const ONE: Self

Source§

impl<T: One + PartialOrd + Zero + Debug> One for Positive<T>

Source§

const ONE: Self

Source§

impl<T: One + PartialOrd + Zero + Debug, const INCLUSIVE_AT_ZERO: bool> One for OnUnit<T, INCLUSIVE_AT_ZERO, true>

Source§

const ONE: Self

Source§

impl<Z: CanBeInfinite + One + Debug> One for Finite<Z>

Source§

const ONE: Self