pub struct Database { /* private fields */ }
Expand description

Represents a FoundationDB database — a mutable, lexicographically ordered mapping from binary keys to binary values.

Modifications to a database are performed via transactions.

Implementations§

Called to set an option an on Database.

Creates a new transaction on the given database.

transact returns a future which retries on error. It tries to resolve a future created by caller-provided function f inside a retry loop, providing it with a newly created transaction. After caller-provided future resolves, the transaction will be committed automatically.

Warning

It might retry indefinitely if the transaction is highly contentious. It is recommended to set TransactionOption::RetryLimit or TransactionOption::SetTimeout on the transaction if the task need to be guaranteed to finish.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.