pub enum SpotCheck {
Never,
Always,
Fraction {
numerator: u32,
denominator: u32,
},
}Expand description
Policy for re-running a sampled fraction of cache hits.
A disagreement between the cached entry and the fresh run is a hard
error (super::ResultCacheError::SpotCheckDivergence) — never a
silent fallback to either result.
Variants§
Never
Never re-run a cache hit. Tests use this to prove reuse.
Always
Re-run every cache hit. Tests use this to prove fail-closed.
Fraction
Re-run numerator / denominator of hits, chosen from the entry id.
Implementations§
Trait Implementations§
impl Copy for SpotCheck
impl Eq for SpotCheck
impl StructuralPartialEq for SpotCheck
Auto Trait Implementations§
impl Freeze for SpotCheck
impl RefUnwindSafe for SpotCheck
impl Send for SpotCheck
impl Sync for SpotCheck
impl Unpin for SpotCheck
impl UnsafeUnpin for SpotCheck
impl UnwindSafe for SpotCheck
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