pub struct FdbApiBuilder { /* private fields */ }
Expand description
A Builder with which different versions of the Fdb C API can be initialized
The foundationDB C API can only be initialized once.
foundationdb::api::FdbApiBuilder::default().build().expect("fdb api initialized");
Implementations§
Source§impl FdbApiBuilder
impl FdbApiBuilder
Sourcepub fn runtime_version(&self) -> i32
pub fn runtime_version(&self) -> i32
The version of run-time behavior the API is requested to provide.
Sourcepub fn set_runtime_version(self, version: i32) -> Self
pub fn set_runtime_version(self, version: i32) -> Self
Set the version of run-time behavior the API is requested to provide.
Must be less than or equal to header_version, foundationdb_sys::FDB_API_VERSION
, and should almost always be equal.
Language bindings which themselves expose API versioning will usually pass the version requested by the application.
Sourcepub fn build(self) -> FdbResult<NetworkBuilder>
pub fn build(self) -> FdbResult<NetworkBuilder>
Initialize the foundationDB API and returns a NetworkBuilder
§Panics
This function will panic if called more than once
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FdbApiBuilder
impl RefUnwindSafe for FdbApiBuilder
impl Send for FdbApiBuilder
impl Sync for FdbApiBuilder
impl Unpin for FdbApiBuilder
impl UnwindSafe for FdbApiBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more