pub struct HeightCache { /* private fields */ }Expand description
LRU cache for measured item heights.
Implementations§
Source§impl HeightCache
impl HeightCache
Sourcepub fn drop_front(&mut self, count: usize)
pub fn drop_front(&mut self, count: usize)
Drop the first count items, shifting every remaining measurement down
by count so it still names the item it was taken from.
The counterpart to VariableHeightsFenwick::drop_front, for callers
that trim a sliding window with Virtualized::trim_front.
Sourcepub fn invalidate(&mut self, idx: usize)
pub fn invalidate(&mut self, idx: usize)
Clear the cached height for idx, reverting it to default_height.
Trait Implementations§
Source§impl Clone for HeightCache
impl Clone for HeightCache
Source§impl Debug for HeightCache
impl Debug for HeightCache
Auto Trait Implementations§
impl Freeze for HeightCache
impl RefUnwindSafe for HeightCache
impl Send for HeightCache
impl Sync for HeightCache
impl Unpin for HeightCache
impl UnsafeUnpin for HeightCache
impl UnwindSafe for HeightCache
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