1mod flat_zip;
2mod group;
3mod groups;
4
5#[cfg(test)]
6mod tests;
7
8pub use flat_zip::FlatZip;
9
10pub trait FlatZipExt: Iterator<Item = (Self::Key, Self::Group)> + Sized {
11 type Key: Clone;
12 type Group: IntoIterator;
13
14 fn flat_zip(self) -> FlatZip<Self, Self::Key, Self::Group>;
15}
16
17impl<I, K, G> FlatZipExt for I
18where
19 I: Iterator<Item = (K, G)>,
20 K: Clone,
21 G: IntoIterator,
22{
23 type Key = K;
24 type Group = G;
25
26 fn flat_zip(self) -> FlatZip<Self, Self::Key, Self::Group> {
27 FlatZip::new(self)
28 }
29}