Skip to main content

IntWithMax

Trait IntWithMax 

Source
pub trait IntWithMax:
    TryInto<usize>
    + TryFrom<usize>
    + Copy
    + Default
    + PartialEq
    + Ord
    + AddAssign
    + SubAssign {
    const MAX: Self;

    // Provided methods
    fn to_usize(self) -> usize { ... }
    fn from_usize(x: usize) -> Self { ... }
    fn one() -> Self { ... }
}
Expand description

A trait facilitating COITree index types.

Required Associated Constants§

Source

const MAX: Self

Provided Methods§

Source

fn to_usize(self) -> usize

Source

fn from_usize(x: usize) -> Self

Source

fn one() -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl IntWithMax for u16

Source§

const MAX: u16 = u16::MAX

Source§

impl IntWithMax for u32

Source§

const MAX: u32 = u32::MAX

Source§

impl IntWithMax for usize

Source§

const MAX: usize = usize::MAX

Implementors§