[][src]Trait indexing::traits::Idx

pub unsafe trait Idx: Copy + Ord + Hash where
    Self: Debug
{ fn as_usize(self) -> usize;
fn from_usize(i: usize) -> Option<Self>;
fn zero() -> Self;
fn add(self, increment: usize) -> Self;
fn sub(self, decrement: usize) -> Self; }

Unsigned integers able to be used as a trusted index.

Required methods

fn as_usize(self) -> usize

fn from_usize(i: usize) -> Option<Self>

fn zero() -> Self

fn add(self, increment: usize) -> Self

fn sub(self, decrement: usize) -> Self

Loading content...

Implementations on Foreign Types

impl Idx for u8[src]

impl Idx for u16[src]

impl Idx for u32[src]

impl Idx for usize[src]

Loading content...

Implementors

Loading content...