1use std::slice::Iter; 2 3pub trait IndexedVector<K, V> { 4 /// Insert an item into the vector. 5 fn insert(&mut self, item: V); 6 /// Search for items with the given key. 7 fn search(&self, key: &K) -> Iter<'_, V>; 8}