Skip to main content

TypeMax

Trait TypeMax 

Source
pub trait TypeMax {
    // Required method
    fn type_max() -> Self;
}
Expand description

For types with a maximum value.

  • Not all Nums implement MinValue / MaxValue, because they may not have value limits. For example a heap allocated int could rise infinitly until there is no more heap memory.

Required Methods§

Source

fn type_max() -> 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 TypeMax for f32

Source§

fn type_max() -> Self

Source§

impl TypeMax for f64

Source§

fn type_max() -> Self

Source§

impl TypeMax for i8

Source§

fn type_max() -> Self

Source§

impl TypeMax for i16

Source§

fn type_max() -> Self

Source§

impl TypeMax for i32

Source§

fn type_max() -> Self

Source§

impl TypeMax for i64

Source§

fn type_max() -> Self

Source§

impl TypeMax for i128

Source§

fn type_max() -> Self

Source§

impl TypeMax for isize

Source§

fn type_max() -> Self

Source§

impl TypeMax for u8

Source§

fn type_max() -> Self

Source§

impl TypeMax for u16

Source§

fn type_max() -> Self

Source§

impl TypeMax for u32

Source§

fn type_max() -> Self

Source§

impl TypeMax for u64

Source§

fn type_max() -> Self

Source§

impl TypeMax for u128

Source§

fn type_max() -> Self

Source§

impl TypeMax for usize

Source§

fn type_max() -> Self

Implementors§