Add len() and ops() to allow some introspection to DBTransaction
This commit is contained in:
parent
19d71d3024
commit
4b870ce38a
|
@ -128,6 +128,14 @@ impl DBTransaction {
|
|||
key: ekey,
|
||||
});
|
||||
}
|
||||
|
||||
pub fn len(&self) -> usize {
|
||||
self.ops.len()
|
||||
}
|
||||
|
||||
pub fn ops(&self) -> impl Iterator<Item = &DBOp> {
|
||||
self.ops.iter()
|
||||
}
|
||||
}
|
||||
|
||||
/// Generic key-value database.
|
||||
|
|
Loading…
Reference in New Issue