pub trait Index: NativeType + AddAssign<Self> + Sub<Self, Output = Self> + One + Num + CheckedAdd + PartialOrd<Self> + Ord {
    fn to_usize(&self) -> usize;
    fn from_usize(index: usize) -> Option<Self>;

    fn range(start: usize, end: usize) -> Option<IndexRange<Self>> { ... }
}
Expand description

Sealed trait describing the subset of NativeType (i32, i64, u32 and u64) that can be used to index a slot of an array.

Required Methods

Convert itself to usize.

Convert itself from usize.

Provided Methods

An iterator from (inclusive) start to (exclusive) end.

Implementations on Foreign Types

Implementors