Trait ArrayIndex

Source
pub trait ArrayIndex:
    Sized
    + Copy
    + Clone
    + Default
    + Hash
    + Debug
    + PartialEq
    + Eq
    + PartialOrd
    + Ord {
    // Required methods
    fn to_usize(self) -> usize;
    fn from_usize(u: usize) -> Self;
}

Required Methods§

Source

fn to_usize(self) -> usize

Source

fn from_usize(u: usize) -> 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 ArrayIndex for u8

Source§

impl ArrayIndex for u16

Source§

impl ArrayIndex for u32

Implementors§