pub struct TierConfig {
pub tier_level: usize,
pub promotion_enabled: bool,
pub ttl_scale: f64,
}Expand description
Configuration for a cache tier (used in builder pattern)
Fields§
§tier_level: usizeTier level (1, 2, 3, 4…)
promotion_enabled: boolEnable promotion to upper tiers on hit
ttl_scale: f64TTL scale factor (1.0 = same as base TTL)
Implementations§
Source§impl TierConfig
impl TierConfig
Sourcepub fn with_promotion(self, enabled: bool) -> Self
pub fn with_promotion(self, enabled: bool) -> Self
Set promotion enabled
Sourcepub fn with_ttl_scale(self, scale: f64) -> Self
pub fn with_ttl_scale(self, scale: f64) -> Self
Set TTL scale factor
Sourcepub fn with_level(self, level: usize) -> Self
pub fn with_level(self, level: usize) -> Self
Set tier level
Trait Implementations§
Source§impl Clone for TierConfig
impl Clone for TierConfig
Source§fn clone(&self) -> TierConfig
fn clone(&self) -> TierConfig
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TierConfig
impl RefUnwindSafe for TierConfig
impl Send for TierConfig
impl Sync for TierConfig
impl Unpin for TierConfig
impl UnwindSafe for TierConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)