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", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl IntWithMax for u16

Source§

const MAX: u16 = 65_535u16

Source§

impl IntWithMax for u32

Source§

const MAX: u32 = 4_294_967_295u32

Source§

impl IntWithMax for usize

Source§

const MAX: usize = 18_446_744_073_709_551_615usize

Implementors§