pub struct StorageStackBuilder { /* private fields */ }Expand description
Storage stack builder for easy configuration
Implementations§
Source§impl StorageStackBuilder
impl StorageStackBuilder
Sourcepub fn with_config(self, config: BlockStoreConfig) -> Self
pub fn with_config(self, config: BlockStoreConfig) -> Self
Set the base storage configuration
Sourcepub fn with_cache(self, size_mb: usize) -> Self
pub fn with_cache(self, size_mb: usize) -> Self
Enable LRU caching with specified size in MB
Sourcepub fn without_cache(self) -> Self
pub fn without_cache(self) -> Self
Disable LRU caching
Sourcepub fn with_bloom(self, expected_items: usize) -> Self
pub fn with_bloom(self, expected_items: usize) -> Self
Enable bloom filter with expected number of items
Sourcepub fn without_bloom(self) -> Self
pub fn without_bloom(self) -> Self
Disable bloom filter
Sourcepub fn with_tiering(self) -> Self
pub fn with_tiering(self) -> Self
Enable hot/cold tiering
Sourcepub fn build_simple(self) -> Result<SledBlockStore>
pub fn build_simple(self) -> Result<SledBlockStore>
Build a simple storage stack (base store only)
Sourcepub fn build_cached(self) -> Result<CachedBlockStore<SledBlockStore>>
pub fn build_cached(self) -> Result<CachedBlockStore<SledBlockStore>>
Build a cached storage stack
Sourcepub fn build_full(
self,
) -> Result<BloomBlockStore<CachedBlockStore<SledBlockStore>>>
pub fn build_full( self, ) -> Result<BloomBlockStore<CachedBlockStore<SledBlockStore>>>
Build a full storage stack with cache and bloom filter
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StorageStackBuilder
impl RefUnwindSafe for StorageStackBuilder
impl Send for StorageStackBuilder
impl Sync for StorageStackBuilder
impl Unpin for StorageStackBuilder
impl UnwindSafe for StorageStackBuilder
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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