Trait Constants

Source
pub trait Constants: ConstZero {
    const ONE: Self;
    const MAX: Self;
}
Expand description

Trait for associating constant values with a type.

Required Associated Constants§

Source

const ONE: Self

The value 1.

Source

const MAX: Self

Maximum value this integer can express.

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.

Implementors§

Source§

impl Constants for Limb

Source§

const ONE: Self = Self::ONE

Source§

const MAX: Self = Self::MAX

Source§

impl<const LIMBS: usize> Constants for Int<LIMBS>

Source§

const ONE: Self = Self::ONE

Source§

const MAX: Self = Self::MAX

Source§

impl<const LIMBS: usize> Constants for Uint<LIMBS>

Source§

const ONE: Self = Self::ONE

Source§

const MAX: Self = Self::MAX