Trait IndexMapExt

Source
pub trait IndexMapExt<T> {
    // Required method
    fn entry_index(&mut self, key: T) -> usize;
}
Expand description

A trait for mapping unique items to an index.

Required Methods§

Source

fn entry_index(&mut self, key: T) -> usize

The index value associated with key. Inserts key with an index equal to the current length if not present.

Implementations on Foreign Types§

Source§

impl<T> IndexMapExt<T> for IndexMap<T, usize>
where T: Hash + Eq,

Source§

fn entry_index(&mut self, key: T) -> usize

Implementors§