papergrid/records/
into_records.rs1pub trait IntoRecords {
3 type Cell;
5
6 type IterColumns: IntoIterator<Item = Self::Cell>;
8
9 type IterRows: IntoIterator<Item = Self::IterColumns>;
11
12 fn iter_rows(self) -> Self::IterRows;
14}
15
16impl<T> IntoRecords for T
17where
18 T: IntoIterator,
19 <T as IntoIterator>::Item: IntoIterator,
20{
21 type Cell = <<T as IntoIterator>::Item as IntoIterator>::Item;
22 type IterColumns = <T as IntoIterator>::Item;
23 type IterRows = <T as IntoIterator>::IntoIter;
24
25 fn iter_rows(self) -> Self::IterRows {
26 self.into_iter()
27 }
28}