Maximum

Trait Maximum 

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

A trait that describes the max value of an unsigned integer. This trait is used to detect overflow. Also, it’s used like a NULL terminator for the free list in [Tec].

Required Methods§

Source

fn max_value() -> Self

Generally this should be X::MAX, where X is an unsigned integer. The value is used to detect overflow.

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

Source§

impl Maximum for u16

Source§

impl Maximum for u32

Source§

impl Maximum for u64

Source§

impl Maximum for usize

Implementors§