Clearing old transactions

This commit is contained in:
Tomasz Drwięga
2016-12-09 15:05:03 +01:00
parent 83f791fa5d
commit 5d054f08c3
2 changed files with 46 additions and 1 deletions

View File

@@ -18,6 +18,7 @@
use std::hash::Hash;
use std::collections::HashMap;
use std::collections::hash_map::Keys;
/// Structure to hold double-indexed values
///
@@ -41,6 +42,11 @@ impl<Row, Col, Val> Table<Row, Col, Val>
}
}
/// Returns keys iterator for this Table.
pub fn keys(&self) -> Keys<Row, HashMap<Col, Val>> {
self.map.keys()
}
/// Removes all elements from this Table
pub fn clear(&mut self) {
self.map.clear();