pub enum CacheFlushPolicy {
Strict,
Batched {
max_dirty: usize,
max_age: Duration,
},
}Expand description
Per-handle flush policy for cache writes. Memory writes ignore this
and always behave as Strict.
Variants§
Strict
Every cache_put dirties the directory; the caller’s next
Mnemo::flush() persists everything.
Batched
The engine internally calls flush() when either the pending
dirty count reaches max_dirty OR the first pending dirty
entry is older than max_age.
Trait Implementations§
Source§impl Clone for CacheFlushPolicy
impl Clone for CacheFlushPolicy
impl Copy for CacheFlushPolicy
Source§impl Debug for CacheFlushPolicy
impl Debug for CacheFlushPolicy
Auto Trait Implementations§
impl Forget for CacheFlushPolicy
impl Freeze for CacheFlushPolicy
impl RefUnwindSafe for CacheFlushPolicy
impl Send for CacheFlushPolicy
impl Sync for CacheFlushPolicy
impl Unpin for CacheFlushPolicy
impl UnsafeUnpin for CacheFlushPolicy
impl UnwindSafe for CacheFlushPolicy
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