Trait array_map::Indexable [−][src]
pub unsafe trait Indexable {
type Iter: Iterator<Item = Self>;
const SIZE: usize;
fn index(self) -> usize;
fn iter() -> Self::Iter;
}Expand description
Allows mapping from a type to an index
This trait is unsafe because there are a few other requirements that need to be met:
- The indexes of self need to be contiguous and need to be returned in order from
iter() - Iter needs to return exactly N items (this is checked in debug mode)
Associated Types
type Iter: Iterator<Item = Self>[src]
type Iter: Iterator<Item = Self>[src]The type of Iterator that will be returned by Self::iter()