pub trait IntoRecords {
type Cell;
type IterColumns: IntoIterator<Item = Self::Cell>;
type IterRows: IntoIterator<Item = Self::IterColumns>;
fn iter_rows(self) -> Self::IterRows;
}
impl<T> IntoRecords for T
where
T: IntoIterator,
<T as IntoIterator>::Item: IntoIterator,
{
type Cell = <<T as IntoIterator>::Item as IntoIterator>::Item;
type IterColumns = <T as IntoIterator>::Item;
type IterRows = <T as IntoIterator>::IntoIter;
fn iter_rows(self) -> Self::IterRows {
self.into_iter()
}
}