Skip to main content

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

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 DenseIdMap<I, T>
where I: Idx, T: Idx,

Source§

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