Trait enum_traits::ToIndex [] [src]

pub trait ToIndex: Index {
    fn into_index(self) -> Self::Type;
    fn index(&self) -> Self::Type;
}

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

Required Methods

Index in the defined order of an enum

Index in the defined order of an enum

Implementors