pub trait WriteManager<'e> {
    fn with_commit_sync<E, R, F>(&'e mut self, f: F) -> Result<R, E>
    where
        E: From<DatabaseError>,
        F: 'e + FnOnce(&mut Transaction<'_>) -> Result<R, E>
; fn with_commit_test<R, F>(&'e mut self, f: F) -> Result<R, DatabaseError>
    where
        F: 'e + FnOnce(&mut Transaction<'_>) -> R
, { ... } }
Expand description

Implementors are able to create a new read-write DB transaction

Required Methods

Run a closure, passing in a mutable reference to a read-write transaction, and commit the transaction after the closure has run. If there is a SQLite error, recover from it and re-run the closure.

Provided Methods

Implementors