[−][src]Function foundationdb::boot
pub unsafe fn boot() -> NetworkAutoStop
Initialize the FoundationDB Client API, this can only be called once per process.
Returns
A NetworkAutoStop
handle which must be dropped before the program exits.
Safety
This method used to be safe in version 0.4
. But because drop
on the returned object
might not be called before the program exits, it was found unsafe.
You should prefer the safe run
variant.
If you still want to use this, you MUST ensure drop is called on the returned object
before the program exits. This is not required if the program is aborted.
Examples
let network = unsafe { foundationdb::boot() }; // do some interesting things with the API... drop(network);
#[tokio::main] async fn main() { let network = unsafe { foundationdb::boot() }; // do some interesting things with the API... drop(network); }