Implement more traits for RowsIter

This commit is contained in:
Steven Fackler 2015-02-18 23:09:40 -08:00
parent 28ea91f6e5
commit 34de2a90c3

View File

@ -1638,6 +1638,19 @@ impl<'a> Iterator for RowsIter<'a> {
}
}
impl<'a> DoubleEndedIterator for RowsIter<'a> {
fn next_back(&mut self) -> Option<Row<'a>> {
self.iter.next_back().map(|row| {
Row {
stmt: self.stmt,
data: Cow::Borrowed(row),
}
})
}
}
impl<'a> ExactSizeIterator for RowsIter<'a> {}
/// A single result row of a query.
pub struct Row<'a> {
stmt: &'a Statement<'a>,