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
Source§fn clone(&self) -> CacheFlushPolicy
fn clone(&self) -> CacheFlushPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CacheFlushPolicy
Source§impl Debug for CacheFlushPolicy
impl Debug for CacheFlushPolicy
Source§impl Default for CacheFlushPolicy
impl Default for CacheFlushPolicy
Source§fn default() -> CacheFlushPolicy
fn default() -> CacheFlushPolicy
Returns the “default value” for a type. Read more
Auto Trait Implementations§
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