pub struct FdbApiBuilder { /* private fields */ }Expand description
A Builder with which different versions of the Fdb C API can be initialized
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>
Selects the foundationDB API version and returns a NetworkBuilder.
Idempotent: re-selecting the version already in use is a no-op.
§Errors
- error 2201 (
api_version_already_set) if a different version was selected before - error 2203 (
api_version_not_supported) if the installed libfdb_c does not support the requested version
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