Add flush method to Database trait

This commit is contained in:
Riccardo Casatta
2021-07-27 11:38:11 +02:00
parent 5cdc5fb58a
commit e52550cfec
4 changed files with 15 additions and 0 deletions

View File

@@ -134,6 +134,9 @@ pub trait Database: BatchOperations {
///
/// It should insert and return `0` if not present in the database
fn increment_last_index(&mut self, keychain: KeychainKind) -> Result<u32, Error>;
/// Force changes to be written to disk, returning the number of bytes written
fn flush(&mut self) -> Result<(), Error>;
}
/// Trait for a database that supports batch operations