pub struct PossibleEvictions<T: IndexValue> {
possible_evictions: Vec<FlushScanResult<T>>,
index: usize,
}
Fields§
§possible_evictions: Vec<FlushScanResult<T>>
vec per age in the future, up to size ‘ages_to_stay_in_cache’
index: usize
next index to use into ‘possible_evictions’ if ‘index’ >= ‘possible_evictions.len()’, then there are no available entries
Implementations§
source§impl<T: IndexValue> PossibleEvictions<T>
impl<T: IndexValue> PossibleEvictions<T>
fn new(max_ages: Age) -> Self
sourcefn get_possible_evictions(&mut self) -> Option<FlushScanResult<T>>
fn get_possible_evictions(&mut self) -> Option<FlushScanResult<T>>
remove the possible evictions. This is required because we need ownership of the Arc strong counts to transfer to caller so entries can be removed from the accounts index
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for PossibleEvictions<T>
impl<T> Send for PossibleEvictions<T>
impl<T> Sync for PossibleEvictions<T>
impl<T> Unpin for PossibleEvictions<T>
impl<T> UnwindSafe for PossibleEvictions<T>
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