Skip to main content

ConstBounded

Trait ConstBounded 

Source
pub trait ConstBounded {
    // Required methods
    fn min_value() -> Self;
    fn max_value() -> Self;
}
Expand description

Const-compatible bounded value operations.

Required Methods§

Source

fn min_value() -> Self

Returns the smallest value of this type.

Source

fn max_value() -> Self

Returns the largest value of this type.

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 ConstBounded for u8

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl ConstBounded for u16

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl ConstBounded for u32

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl ConstBounded for u64

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl ConstBounded for u128

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Implementors§

Source§

impl<T: ConstMachineWord + MachineWord, const N: usize> ConstBounded for FixedUInt<T, N>