window iterator stub

This commit is contained in:
fuckwit 2023-11-26 23:15:08 +01:00
parent 01f5df4774
commit a1a2023b72

View File

@ -72,3 +72,30 @@ pub trait CombinationsIterator<T>: Iterator<Item = T> + Sized {
}
impl<I, T> CombinationsIterator<T> for I where I: Iterator<Item = T> {}
pub struct Window<const SIZE: usize, I, T>
where
I: Iterator<Item = T>,
{
iter: I,
}
impl<const SIZE: usize, I, T> Window<SIZE, I, T>
where
I: Iterator<Item = T>,
{
pub fn new(iter: I) -> Self {
Self { iter }
}
}
impl<const SIZE: usize, I, T> Iterator for Window<SIZE, I, T>
where
I: Iterator<Item = T>,
{
type Item = [I::Item; SIZE];
fn next(&mut self) -> Option<Self::Item> {
todo!()
}
}