You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: collector.rs
    path of file: ./repos/akula/src/etl
    
    the code of the file until where you have to start completion: use super::data_provider::*;
use crate::kv::{mdbx::*, tables::ErasedTable, traits::*};
use derive_more::*;
use std::{
    cmp::Reverse,
    collections::BinaryHeap,
    ops::{Generator, GeneratorState},
    pin::Pin,
};
use tempfile::TempDir;

pub struct Collector<'tmp, Key, Value>
where
    Ke
    
    fn next(&mut self) -> Option<Self::Item> {
        if self.done {
            return None;
        }

        match Pin::new(&mut self.inner).resume(()) {
            GeneratorState::Yielded(res) => Some(res),
            GeneratorState::Complete(res) => {
                self.done = true;
                match res {
                    Ok(()) => None,
                    Err(e) => Some(Err(e)),
                }
            }
        }
    }