Trait stash::index::Index [] [src]

pub trait Index {
    fn from_usize(idx: usize) -> Self;
    fn into_usize(self) -> usize;
}

Every index type to be used with Stash needs to implement this trait

Required Methods

Create an index from usize.

This method should panic if idx is out of acceptable range.

Turn this index into usize

Implementors