Trait cl_structures::index_map::MapIndex

source ·
pub trait MapIndex: Debug {
    // Required methods
    fn from_usize(value: usize) -> Self;
    fn get(&self) -> usize;
}
Expand description

An index into a IndexMap. For full type-safety, there should be a unique MapIndex for each IndexMap.

Required Methods§

source

fn from_usize(value: usize) -> Self

Constructs an MapIndex from a usize without checking bounds.

The provided value should be within the bounds of its associated container.

source

fn get(&self) -> usize

Gets the index of the MapIndex by value

Object Safety§

This trait is not object safe.

Implementors§