aboutsummaryrefslogtreecommitdiff
path: root/database/src/kv/merge_iterator.rs
blob: e8728237003bfd114d37ae5afe49a2b057975a95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
    This file is part of jellything (https://codeberg.org/metamuffin/jellything)
    which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
    Copyright (C) 2026 metamuffin <metamuffin.org>
*/

use crate::RowNum;
use anyhow::Result;

#[allow(clippy::type_complexity)]
pub struct MergeIterator<'a> {
    iters: Vec<Box<dyn Iterator<Item = Result<(RowNum, Vec<u8>)>> + 'a>>,
}
impl<'a> MergeIterator<'a> {
    #[allow(clippy::type_complexity)]
    pub fn new(iters: Vec<Box<dyn Iterator<Item = Result<(RowNum, Vec<u8>)>> + 'a>>) -> Self {
        Self { iters }
    }
}
impl<'a> Iterator for MergeIterator<'a> {
    type Item = Result<(RowNum, Vec<u8>)>;
    fn next(&mut self) -> Option<Self::Item> {
        let _ = self.iters;
        todo!()
    }
}