pub struct PendingCacheState {
pub clear_generation: u64,
pub next_key_generation: u64,
pub key_generations: HashMap<u64, u64>,
pub operations: HashMap<u64, PendingCacheOp>,
pub approx_bytes: usize,
}Expand description
State of the pending-operation map. The worker publishes stores only when the queued op’s per-key generation still matches the latest generation seen for that key — a newer invalidate cannot be silently overwritten.
Fields§
§clear_generation: u64§next_key_generation: u64§key_generations: HashMap<u64, u64>Per-key, monotonically increasing generation. A Remove resets a key
to the same generation as a fresh Store would receive, so any prior
Store is observed as stale.
operations: HashMap<u64, PendingCacheOp>§approx_bytes: usizePer-op byte estimate: sum of entry.bytes for Stores. Used for
the max_pending_bytes capacity check; checked/saturating on every
transition.
Trait Implementations§
Source§impl Debug for PendingCacheState
impl Debug for PendingCacheState
Auto Trait Implementations§
impl !RefUnwindSafe for PendingCacheState
impl !Sync for PendingCacheState
impl !UnwindSafe for PendingCacheState
impl Freeze for PendingCacheState
impl Send for PendingCacheState
impl Unpin for PendingCacheState
impl UnsafeUnpin for PendingCacheState
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