LookupByIdx

Trait LookupByIdx 

Source
pub trait LookupByIdx<ID, V>
where ID: Idx,
{ // Required method fn get(&self, id: ID) -> Option<&V>; }
Expand description

A trait for looking up values by ID.

Required Methods§

Source

fn get(&self, id: ID) -> Option<&V>

Get the value for the given ID.

Implementations on Foreign Types§

Source§

impl<K, V> LookupByIdx<K, V> for BTreeMap<K, V>
where K: Idx,

Source§

fn get(&self, id: K) -> Option<&V>

Implementors§

Source§

impl<I, T> LookupByIdx<I, T> for IndexVec<I, T>
where I: Idx,