pub struct CacheEvictionDeferral(/* private fields */);Expand description
RAII guard deferring page-cache eviction until the outermost scope drops.
Evictions requested after the last scope has dropped are issued immediately, exactly as if no scope had existed — keep the scope alive for the whole multi-pass operation. The depth is process-global: scopes held by concurrent operations combine, and the last one out drains.
Implementations§
Source§impl CacheEvictionDeferral
impl CacheEvictionDeferral
Sourcepub fn acquire() -> Self
pub fn acquire() -> Self
Open a deferral scope. Callers running a multi-pass operation (an external verify-then-repair flow, for example) hold this across every pass so intermediate reads stay cached until the operation completes.
The guard must be dropped: leaking it (mem::forget, a leaked task
still holding it) leaves the depth raised and disables the eviction
discipline for the rest of the process.
Trait Implementations§
Source§impl Drop for CacheEvictionDeferral
impl Drop for CacheEvictionDeferral
Auto Trait Implementations§
impl Freeze for CacheEvictionDeferral
impl RefUnwindSafe for CacheEvictionDeferral
impl Send for CacheEvictionDeferral
impl Sync for CacheEvictionDeferral
impl Unpin for CacheEvictionDeferral
impl UnsafeUnpin for CacheEvictionDeferral
impl UnwindSafe for CacheEvictionDeferral
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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