#![allow(unused_variables)] // TODO(you): remove this lint after implementing this mod #![allow(dead_code)] // TODO(you): remove this lint after implementing this mod use anyhow::Result; use super::StorageIterator; /// Merges two iterators of different types into one. If the two iterators have the same key, only /// produce the key once and prefer the entry from A. pub struct TwoMergeIterator { a: A, b: B, // Add fields as need } impl< A: 'static + StorageIterator, B: 'static + for<'a> StorageIterator = A::KeyType<'a>>, > TwoMergeIterator { pub fn create(a: A, b: B) -> Result { unimplemented!() } } impl< A: 'static + StorageIterator, B: 'static + for<'a> StorageIterator = A::KeyType<'a>>, > StorageIterator for TwoMergeIterator { type KeyType<'a> = A::KeyType<'a>; fn key(&self) -> Self::KeyType<'_> { unimplemented!() } fn value(&self) -> &[u8] { unimplemented!() } fn is_valid(&self) -> bool { unimplemented!() } fn next(&mut self) -> Result<()> { unimplemented!() } }