Struct boringdb::Dict [−][src]
pub struct Dict { /* fields omitted */ }
Expand description
A clonable on-disk mapping, corresponding to a table in SQLite
Implementations
Inserts a key/value pair.
Iterate through tuples of keys and values, where the keys fall within the specified range.
Note: currently this function returns an iterator that locks the whole dictionary until it is dropped. This will change the future.
Runs a transaction. This is NOT optimistic, but rather locking, so care should be taken to avoid long-running transactions.
Flushes to disk. Guarantees that all operations that happens before the call reaches disk before this call terminates.
Note: This can be very slow, especially after a large number of writes. Calling this function is not needed for atomicity or crash-safety, but only when you want to absolutely prevent the database from traveling “back in time” a few seconds in case of a crash. Usually this is only needed if you e.g. want to store a reference to an object in this boringdb database in some other database, and you cannot tolerate “dangling pointers”.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Dict
impl !UnwindSafe for Dict
Blanket Implementations
Mutably borrows from an owned value. Read more