Trait total_space::IndexLike[][src]

pub trait IndexLike: KeyLike + PartialOrd + Ord {
    fn from_usize(value: usize) -> Self;
fn to_usize(&self) -> usize;
fn invalid() -> Self; fn decr(&mut self) { ... }
fn incr(&mut self) { ... }
fn is_valid(&self) -> bool { ... } }

A trait for anything we use as a zero-based index.

Required methods

fn from_usize(value: usize) -> Self[src]

Convert a usize to the index.

fn to_usize(&self) -> usize[src]

Convert the index to a usize.

fn invalid() -> Self[src]

The invalid (maximal) value.

Loading content...

Provided methods

fn decr(&mut self)[src]

Decrement the value.

fn incr(&mut self)[src]

Increment the value.

fn is_valid(&self) -> bool[src]

Is a valid value (not the maximal value).

Loading content...

Implementors

Loading content...