Struct boringdb::Dict[][src]

pub struct Dict { /* fields omitted */ }
Expand description

A clonable on-disk mapping, corresponding to a table in SQLite

Implementations

Gets a key/value pair.

Inserts a key/value pair.

Delete a key.

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.