Skip to main content

MaxValue

Trait MaxValue 

Source
pub trait MaxValue: Sized {
    const MAX: Self;

    // Provided methods
    fn is_max(&self) -> bool
       where Self: PartialEq { ... }
    fn is_not_max(&self) -> bool
       where Self: PartialEq { ... }
}

Required Associated Constants§

Source

const MAX: Self

Provided Methods§

Source

fn is_max(&self) -> bool
where Self: PartialEq,

Source

fn is_not_max(&self) -> bool
where Self: PartialEq,

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 MaxValue for bool

Source§

const MAX: bool = true

Source§

impl MaxValue for char

Source§

const MAX: char = Self::MAX

Source§

impl MaxValue for f32

Source§

const MAX: f32 = Self::MAX

Source§

impl MaxValue for f64

Source§

const MAX: f64 = Self::MAX

Source§

impl MaxValue for i8

Source§

const MAX: i8 = Self::MAX

Source§

impl MaxValue for i16

Source§

const MAX: i16 = Self::MAX

Source§

impl MaxValue for i32

Source§

const MAX: i32 = Self::MAX

Source§

impl MaxValue for i64

Source§

const MAX: i64 = Self::MAX

Source§

impl MaxValue for isize

Source§

const MAX: isize = Self::MAX

Source§

impl MaxValue for u8

Source§

const MAX: u8 = Self::MAX

Source§

impl MaxValue for u16

Source§

const MAX: u16 = Self::MAX

Source§

impl MaxValue for u32

Source§

const MAX: u32 = Self::MAX

Source§

impl MaxValue for u64

Source§

const MAX: u64 = Self::MAX

Source§

impl MaxValue for usize

Source§

const MAX: usize = Self::MAX

Source§

impl<T> MaxValue for Saturating<T>
where T: MaxValue,

Source§

impl<T> MaxValue for Wrapping<T>
where T: MaxValue,

Source§

impl<T, const N: usize> MaxValue for [T; N]
where T: MaxValue,

Implementors§

Source§

impl<T> MaxValue for AngleOf<T>
where T: MaxValue,

Source§

impl<T> MaxValue for HslaOf<T>
where T: MaxValue + Copy,

Source§

impl<T> MaxValue for RgbaOf<T>
where T: MaxValue + Copy,

Source§

impl<T> MaxValue for TimeOf<T>
where T: MaxValue,

Source§

impl<T> MaxValue for RectangleOf<T>
where T: MaxValue + Copy,

Source§

impl<T, const N: usize> MaxValue for Vector<T, N>
where T: MaxValue + Copy,

Source§

const MAX: Vector<T, N>

Source§

impl<T, const ROW: usize, const COL: usize> MaxValue for Matrix<T, ROW, COL>
where T: MaxValue + Copy,

Source§

const MAX: Matrix<T, ROW, COL>