pub struct MultiTierBuilder<L1, L2> { /* private fields */ }Expand description
Builder for configuring a multi-tier backend.
Implementations§
Source§impl<L1, L2> MultiTierBuilder<L1, L2>
impl<L1, L2> MultiTierBuilder<L1, L2>
Sourcepub fn promotion_strategy(self, strategy: PromotionStrategy) -> Self
pub fn promotion_strategy(self, strategy: PromotionStrategy) -> Self
Sets the promotion strategy.
Sourcepub fn promotion_threshold(self, threshold: u64) -> Self
pub fn promotion_threshold(self, threshold: u64) -> Self
Sets the promotion threshold for hit-count based promotion.
Sourcepub fn write_through(self, enabled: bool) -> Self
pub fn write_through(self, enabled: bool) -> Self
Enables or disables write-through to L1.
Sourcepub fn max_l1_entry_size(self, size: Option<usize>) -> Self
pub fn max_l1_entry_size(self, size: Option<usize>) -> Self
Sets the maximum entry size for L1 cache. Entries larger than this will only be stored in L2.
Sourcepub fn build(self) -> MultiTierBackend<L1, L2>
pub fn build(self) -> MultiTierBackend<L1, L2>
Builds the multi-tier backend.
Trait Implementations§
Auto Trait Implementations§
impl<L1, L2> Freeze for MultiTierBuilder<L1, L2>
impl<L1, L2> RefUnwindSafe for MultiTierBuilder<L1, L2>where
L1: RefUnwindSafe,
L2: RefUnwindSafe,
impl<L1, L2> Send for MultiTierBuilder<L1, L2>
impl<L1, L2> Sync for MultiTierBuilder<L1, L2>
impl<L1, L2> Unpin for MultiTierBuilder<L1, L2>
impl<L1, L2> UnwindSafe for MultiTierBuilder<L1, L2>where
L1: UnwindSafe,
L2: 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