pub struct NodeCache<P>{ /* private fields */ }Implementations§
Source§impl<P> NodeCache<P>
impl<P> NodeCache<P>
pub fn new(cap: usize, _unused: usize) -> Self
Sourcepub fn peek(&self, id: &P::Id) -> Option<P::Page>
pub fn peek(&self, id: &P::Id) -> Option<P::Page>
Return a clone of the cached page without mutating LRU state.
pub fn set_limits(&mut self, read_cap: usize, _sweep_factor: usize)
pub fn get(&mut self, id: &P::Id) -> Option<P::Page>
pub fn insert(&mut self, id: P::Id, page: P::Page)
pub fn invalidate(&mut self, id: &P::Id)
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl<P> Freeze for NodeCache<P>
impl<P> RefUnwindSafe for NodeCache<P>
impl<P> Send for NodeCache<P>
impl<P> Sync for NodeCache<P>
impl<P> Unpin for NodeCache<P>
impl<P> UnwindSafe for NodeCache<P>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more