window iterator stub
This commit is contained in:
parent
01f5df4774
commit
a1a2023b72
@ -72,3 +72,30 @@ pub trait CombinationsIterator<T>: Iterator<Item = T> + Sized {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<I, T> CombinationsIterator<T> for I where I: Iterator<Item = T> {}
|
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!()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user