Struct foyer_memory::LfuConfig
source · pub struct LfuConfig {
pub window_capacity_ratio: f64,
pub protected_capacity_ratio: f64,
pub cmsketch_eps: f64,
pub cmsketch_confidence: f64,
}Fields§
§window_capacity_ratio: f64window capacity ratio of the total cache capacity.
Must be in (0, 1).
Must guarantee window_capacity_ratio + protected_capacity_ratio < 1.
protected_capacity_ratio: f64protected capacity ratio of the total cache capacity.
Must be in (0, 1).
Must guarantee window_capacity_ratio + protected_capacity_ratio < 1.
cmsketch_eps: f64§cmsketch_confidence: f64Trait Implementations§
source§impl From<LfuConfig> for EvictionConfig
impl From<LfuConfig> for EvictionConfig
source§fn from(value: LfuConfig) -> EvictionConfig
fn from(value: LfuConfig) -> EvictionConfig
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LfuConfig
impl RefUnwindSafe for LfuConfig
impl Send for LfuConfig
impl Sync for LfuConfig
impl Unpin for LfuConfig
impl UnwindSafe for LfuConfig
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