pub struct Options { /* private fields */ }
Expand description
The options for configuring a ThetaDB instance.
Implementations§
source§impl Options
impl Options
sourcepub fn page_size(&mut self, page_size: Option<u32>) -> &mut Self
pub fn page_size(&mut self, page_size: Option<u32>) -> &mut Self
Set the size of a page in the ThetaDB.
By default, it is the operating system’s memory page size. And the minimum page size is 4 KB.
sourcepub fn force_sync(&mut self, flag: bool) -> &mut Self
pub fn force_sync(&mut self, flag: bool) -> &mut Self
Decide whether to force synchronization on every commit of the read write transaction.
If it is true, every commit of the read write transaction will be immediately followed by a sync operation. If it is false, sync operation will be performed according to the operating system’s internal logic.
sourcepub fn mempool_capacity(&mut self, capacity: usize) -> &mut Self
pub fn mempool_capacity(&mut self, capacity: usize) -> &mut Self
Set the capacity of the memory pool. Represents the number of pages that can be reused.
By default, it is 4.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
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