pub trait MruEntry:
Keyed
+ Clone
+ Serialize
+ DeserializeOwned
+ Send
+ 'static {
// Provided methods
fn is_pinned(&self) -> bool { ... }
fn set_pinned(&mut self, _pinned: bool) { ... }
fn touch(&mut self) { ... }
}Expand description
Provided Methods§
Sourcefn is_pinned(&self) -> bool
fn is_pinned(&self) -> bool
Whether this entry should resist eviction by cap_to_max.
Default: never pinned.
Sourcefn set_pinned(&mut self, _pinned: bool)
fn set_pinned(&mut self, _pinned: bool)
Set the pinned flag. Default: ignore.
Sourcefn touch(&mut self)
fn touch(&mut self)
Hook called by MruList::add and MruList::touch to mark
this entry as freshly used. Apps that track a last_opened
timestamp update it here. Default: no-op.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".