Trait GenericIndex

Source
pub trait GenericIndex<V: Clone, const N: usize> {
    const VALUES: [V; N];
    const LENGTH: usize = N;

    // Required methods
    fn from_usize(n: usize) -> Self;
    fn into_usize(self) -> usize;
}

Required Associated Constants§

Provided Associated Constants§

Source

const LENGTH: usize = N

Required Methods§

Source

fn from_usize(n: usize) -> Self

Source

fn into_usize(self) -> usize

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.

Implementors§

Source§

impl GenericIndex<Good, 24> for GoodIndex

Source§

const VALUES: [Good; 24]