pub enum WitnessEvent {
Access {
key: BlockKey,
score: f32,
tier: Tier,
},
TierChange {
key: BlockKey,
from_tier: Tier,
to_tier: Tier,
score: f32,
reason: TierChangeReason,
},
Eviction {
key: BlockKey,
score: f32,
bytes_freed: usize,
},
Maintenance {
upgrades: u32,
downgrades: u32,
evictions: u32,
bytes_freed: usize,
budget_remaining_bytes: u32,
budget_remaining_ops: u32,
},
Compaction {
key: BlockKey,
chain_len_before: u8,
},
ChecksumFailure {
key: BlockKey,
expected: u32,
actual: u32,
},
Reconstruction {
key: BlockKey,
policy: ReconstructPolicy,
success: bool,
},
}Expand description
Types of witnessed events.
Every variant captures the minimum context required to reconstruct the decision after the fact (key, scores, tiers, byte counts).
Variants§
Access
A block was accessed (read or write).
TierChange
A block changed tiers.
Eviction
A block was evicted (compressed to zero).
Maintenance
A maintenance tick was processed.
Fields
Compaction
A delta chain was compacted.
ChecksumFailure
A checksum mismatch was detected.
Reconstruction
A block was reconstructed from deltas or factors.
Trait Implementations§
Source§impl Clone for WitnessEvent
impl Clone for WitnessEvent
Source§fn clone(&self) -> WitnessEvent
fn clone(&self) -> WitnessEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WitnessEvent
impl RefUnwindSafe for WitnessEvent
impl Send for WitnessEvent
impl Sync for WitnessEvent
impl Unpin for WitnessEvent
impl UnwindSafe for WitnessEvent
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