pub struct LruReplacement { /* private fields */ }Expand description
Least recently used (LRU) cache replacement.
When considering which one of N cache values to replace, choose the one that was least recently used.
Requires that the cache value type implement LruTimestamp.
Trait Implementations§
Source§impl Clone for LruReplacement
impl Clone for LruReplacement
Source§fn clone(&self) -> LruReplacement
fn clone(&self) -> LruReplacement
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 LruReplacement
impl Debug for LruReplacement
Source§impl Default for LruReplacement
impl Default for LruReplacement
Source§fn default() -> LruReplacement
fn default() -> LruReplacement
Returns the “default value” for a type. Read more
Source§impl Hash for LruReplacement
impl Hash for LruReplacement
Source§impl Ord for LruReplacement
impl Ord for LruReplacement
Source§fn cmp(&self, other: &LruReplacement) -> Ordering
fn cmp(&self, other: &LruReplacement) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LruReplacement
impl PartialEq for LruReplacement
Source§impl PartialOrd for LruReplacement
impl PartialOrd for LruReplacement
Source§impl<V, C> Replacement<V, C> for LruReplacementwhere
C: Capacity,
V: LruTimestamp,
impl<V, C> Replacement<V, C> for LruReplacementwhere
C: Capacity,
V: LruTimestamp,
Source§fn choose_for_replacement<'a>(
&mut self,
candidates: impl ExactSizeIterator<Item = (usize, &'a V)>,
) -> usizewhere
V: 'a,
fn choose_for_replacement<'a>(
&mut self,
candidates: impl ExactSizeIterator<Item = (usize, &'a V)>,
) -> usizewhere
V: 'a,
Choose which of the given cache entries will be replaced.
impl Eq for LruReplacement
impl StructuralPartialEq for LruReplacement
Auto Trait Implementations§
impl Freeze for LruReplacement
impl RefUnwindSafe for LruReplacement
impl Send for LruReplacement
impl Sync for LruReplacement
impl Unpin for LruReplacement
impl UnwindSafe for LruReplacement
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