pub struct MemoConfig {
pub max_entries: usize,
pub min_steps_to_cache: u32,
pub eviction_threshold: f64,
}Expand description
Configuration parameters for a WhnfMemo instance.
Fields§
§max_entries: usizeMaximum number of entries in the cache before eviction is triggered.
min_steps_to_cache: u32Minimum number of reduction steps required before a result is cached.
Results achieved in fewer steps are cheap to recompute and not worth the memory overhead.
eviction_threshold: f64Fraction of max_entries used as the access-count threshold during
cold eviction. Entries whose access_count is below
floor(max_entries * eviction_threshold) are considered cold and may
be removed.
Trait Implementations§
Source§impl Clone for MemoConfig
impl Clone for MemoConfig
Source§fn clone(&self) -> MemoConfig
fn clone(&self) -> MemoConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MemoConfig
impl Debug for MemoConfig
Auto Trait Implementations§
impl Freeze for MemoConfig
impl RefUnwindSafe for MemoConfig
impl Send for MemoConfig
impl Sync for MemoConfig
impl Unpin for MemoConfig
impl UnsafeUnpin for MemoConfig
impl UnwindSafe for MemoConfig
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