Module future

Source
Expand description

Most functions in the FoundationDB API are asynchronous, meaning that they may return to the caller before actually delivering their Fdbresult.

These functions always return FDBFuture*. An FDBFuture object represents a Fdbresult value or error to be delivered at some future time. You can wait for a Future to be “ready” – to have a value or error delivered – by setting a callback function, or by blocking a thread, or by polling. Once a Future is ready, you can extract either an error code or a value of the appropriate type (the documentation for the original function will tell you which fdb_future_get_*() function you should call).

Futures make it easy to do multiple operations in parallel, by calling several asynchronous functions before waiting for any of the Fdbresults. This can be important for reducing the latency of transactions.

Re-exports§

pub use crate::fdb_keys::FdbKeys;
pub use crate::mapped_key_values::MappedKeyValues;

Structs§

FdbAddress
An address owned by a foundationDB future
FdbAddresses
A slice of addresses owned by a foundationDB future
FdbKeyValue
A keyvalue owned by a foundationDB future
FdbSlice
A slice of bytes owned by a foundationDB future
FdbValue
A keyvalue you can own
FdbValues
An slice of keyvalues owned by a foundationDB future
FdbValuesIter
An iterator of keyvalues owned by a foundationDB future