Struct bbolt_rs::BoltOptionsBuilder
source · 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)>
pub fn no_sync( self ) -> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, (bool,), __mlock, __max_batch_size, __max_batch_delay)>
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)>
pub fn mlock( self ) -> BoltOptionsBuilder<(__preload_freelist, __initial_mmap_size, __page_size, __no_sync, (bool,), __max_batch_size, __max_batch_delay)>
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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