Trait ToIndex

Source
pub trait ToIndex: Index {
    // Required methods
    fn into_index(self) -> <Self as Index>::Type;
    fn index(&self) -> <Self as Index>::Type;
}
Expand description

Derive this trait for an enum automatically using #[derive(EnumToIndex)]

Required Methods§

Source

fn into_index(self) -> <Self as Index>::Type

Index in the defined order of an enum

Source

fn index(&self) -> <Self as Index>::Type

Index in the defined order of an enum

Implementors§