pub struct BoltOptionsBuilder<TypedBuilderFields = ((), (), (), (), (), (), ())> { /* private fields */ }
Expand description
Builder for BoltOptions
instances.
See BoltOptions::builder()
for more info.
Implementations§
Source§impl<__initial_mmap_size, __page_size, __no_sync, __mlock, __max_batch_size, __max_batch_delay> BoltOptionsBuilder<((), __initial_mmap_size, __page_size, __no_sync, __mlock, __max_batch_size, __max_batch_delay)>
impl<__initial_mmap_size, __page_size, __no_sync, __mlock, __max_batch_size, __max_batch_delay> BoltOptionsBuilder<((), __initial_mmap_size, __page_size, __no_sync, __mlock, __max_batch_size, __max_batch_delay)>
Sourcepub fn preload_freelist(
self,
) -> BoltOptionsBuilder<((bool,), __initial_mmap_size, __page_size, __no_sync, __mlock, __max_batch_size, __max_batch_delay)>
pub fn preload_freelist( self, ) -> BoltOptionsBuilder<((bool,), __initial_mmap_size, __page_size, __no_sync, __mlock, __max_batch_size, __max_batch_delay)>
Sets whether to load the free pages when opening the db file.Note when opening db in write mode, bbolt will always load the free pages.
Source§impl<__preload_freelist, __page_size, __no_sync, __mlock, __max_batch_size, __max_batch_delay> BoltOptionsBuilder<(__preload_freelist, (), __page_size, __no_sync, __mlock, __max_batch_size, __max_batch_delay)>
impl<__preload_freelist, __page_size, __no_sync, __mlock, __max_batch_size, __max_batch_delay> BoltOptionsBuilder<(__preload_freelist, (), __page_size, __no_sync, __mlock, __max_batch_size, __max_batch_delay)>
Sourcepub fn initial_mmap_size(
self,
initial_mmap_size: u64,
) -> BoltOptionsBuilder<(__preload_freelist, (Option<u64>,), __page_size, __no_sync, __mlock, __max_batch_size, __max_batch_delay)>
pub fn initial_mmap_size( self, initial_mmap_size: u64, ) -> BoltOptionsBuilder<(__preload_freelist, (Option<u64>,), __page_size, __no_sync, __mlock, __max_batch_size, __max_batch_delay)>
InitialMmapSize is the initial mmap size of the database in bytes. Read transactions won’t block write transaction if the InitialMmapSize is large enough to hold database mmap size.
Source§impl<__preload_freelist, __initial_mmap_size, __no_sync, __mlock, __max_batch_size, __max_batch_delay> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, (), __no_sync, __mlock, __max_batch_size, __max_batch_delay)>
impl<__preload_freelist, __initial_mmap_size, __no_sync, __mlock, __max_batch_size, __max_batch_delay> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, (), __no_sync, __mlock, __max_batch_size, __max_batch_delay)>
Source§impl<__preload_freelist, __initial_mmap_size, __page_size, __mlock, __max_batch_size, __max_batch_delay> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, (), __mlock, __max_batch_size, __max_batch_delay)>
impl<__preload_freelist, __initial_mmap_size, __page_size, __mlock, __max_batch_size, __max_batch_delay> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, (), __mlock, __max_batch_size, __max_batch_delay)>
Sourcepub fn no_sync(
self,
) -> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, (bool,), __mlock, __max_batch_size, __max_batch_delay)>
pub fn no_sync( self, ) -> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, (bool,), __mlock, __max_batch_size, __max_batch_delay)>
NoSync sets the initial value of DB.NoSync. Normally this can just be set directly on the DB itself when returned from Open(), but this option is useful in APIs which expose Options but not the underlying DB.
Source§impl<__preload_freelist, __initial_mmap_size, __page_size, __no_sync, __max_batch_size, __max_batch_delay> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, __no_sync, (), __max_batch_size, __max_batch_delay)>
impl<__preload_freelist, __initial_mmap_size, __page_size, __no_sync, __max_batch_size, __max_batch_delay> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, __no_sync, (), __max_batch_size, __max_batch_delay)>
Sourcepub fn mlock(
self,
) -> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, __no_sync, (bool,), __max_batch_size, __max_batch_delay)>
pub fn mlock( self, ) -> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, __no_sync, (bool,), __max_batch_size, __max_batch_delay)>
Mlock locks database file in memory when set to true. It prevents potential page faults, however used memory can’t be reclaimed. (UNIX only)
Source§impl<__preload_freelist, __initial_mmap_size, __page_size, __no_sync, __mlock, __max_batch_delay> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, __no_sync, __mlock, (), __max_batch_delay)>
impl<__preload_freelist, __initial_mmap_size, __page_size, __no_sync, __mlock, __max_batch_delay> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, __no_sync, __mlock, (), __max_batch_delay)>
Sourcepub fn max_batch_size(
self,
max_batch_size: u32,
) -> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, __no_sync, __mlock, (Option<u32>,), __max_batch_delay)>
pub fn max_batch_size( self, max_batch_size: u32, ) -> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, __no_sync, __mlock, (Option<u32>,), __max_batch_delay)>
max_batch_size is the maximum size of a batch.
Source§impl<__preload_freelist, __initial_mmap_size, __page_size, __no_sync, __mlock, __max_batch_size> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, __no_sync, __mlock, __max_batch_size, ())>
impl<__preload_freelist, __initial_mmap_size, __page_size, __no_sync, __mlock, __max_batch_size> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, __no_sync, __mlock, __max_batch_size, ())>
Sourcepub fn max_batch_delay(
self,
max_batch_delay: Duration,
) -> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, __no_sync, __mlock, __max_batch_size, (Option<Duration>,))>
pub fn max_batch_delay( self, max_batch_delay: Duration, ) -> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, __no_sync, __mlock, __max_batch_size, (Option<Duration>,))>
max_batch_delay is the maximum delay before a batch starts.
Source§impl<__preload_freelist: Optional<bool>, __initial_mmap_size: Optional<Option<u64>>, __page_size: Optional<Option<usize>>, __no_sync: Optional<bool>, __mlock: Optional<bool>, __max_batch_size: Optional<Option<u32>>, __max_batch_delay: Optional<Option<Duration>>> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, __no_sync, __mlock, __max_batch_size, __max_batch_delay)>
impl<__preload_freelist: Optional<bool>, __initial_mmap_size: Optional<Option<u64>>, __page_size: Optional<Option<usize>>, __no_sync: Optional<bool>, __mlock: Optional<bool>, __max_batch_size: Optional<Option<u32>>, __max_batch_delay: Optional<Option<Duration>>> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, __no_sync, __mlock, __max_batch_size, __max_batch_delay)>
Sourcepub fn build(self) -> BoltOptions
pub fn build(self) -> BoltOptions
Finalise the builder and create its BoltOptions
instance
Trait Implementations§
Auto Trait Implementations§
impl<TypedBuilderFields> Freeze for BoltOptionsBuilder<TypedBuilderFields>where
TypedBuilderFields: Freeze,
impl<TypedBuilderFields> RefUnwindSafe for BoltOptionsBuilder<TypedBuilderFields>where
TypedBuilderFields: RefUnwindSafe,
impl<TypedBuilderFields> Send for BoltOptionsBuilder<TypedBuilderFields>where
TypedBuilderFields: Send,
impl<TypedBuilderFields> Sync for BoltOptionsBuilder<TypedBuilderFields>where
TypedBuilderFields: Sync,
impl<TypedBuilderFields> Unpin for BoltOptionsBuilder<TypedBuilderFields>where
TypedBuilderFields: Unpin,
impl<TypedBuilderFields> UnwindSafe for BoltOptionsBuilder<TypedBuilderFields>where
TypedBuilderFields: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more