pub enum CacheMissReason {
InvalidEnvelope,
TypeMismatch,
VersionTooNew,
BodyError,
}Expand description
Why a cache entry could not be decoded into the expected type.
Carried by CacheDecode::Miss so backends can emit targeted metrics
(e.g. distinguish “evicting due to a stale format” from “type collision”)
without re-parsing. Every reason maps to the same behavior — recompute via
the loader — so callers that don’t care can ignore it.
Variants§
InvalidEnvelope
Absent or wrong magic, unknown envelope_version, truncated framing, or
a non-utf8 type_id. Typically an entry written by a pre-stabilization
or otherwise foreign build.
TypeMismatch
Well-formed envelope, but its type_id names a different entry type than
the codec reading it.
VersionTooNew
Written by a newer build whose type_version this build does not
understand and must not attempt to interpret.
BodyError
Envelope validated, but the body failed to decode (truncation, a malformed protobuf header, an IPC error, etc.).
Trait Implementations§
Source§impl Clone for CacheMissReason
impl Clone for CacheMissReason
Source§fn clone(&self) -> CacheMissReason
fn clone(&self) -> CacheMissReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CacheMissReason
Source§impl Debug for CacheMissReason
impl Debug for CacheMissReason
impl Eq for CacheMissReason
Source§impl PartialEq for CacheMissReason
impl PartialEq for CacheMissReason
Source§fn eq(&self, other: &CacheMissReason) -> bool
fn eq(&self, other: &CacheMissReason) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CacheMissReason
Auto Trait Implementations§
impl Freeze for CacheMissReason
impl RefUnwindSafe for CacheMissReason
impl Send for CacheMissReason
impl Sync for CacheMissReason
impl Unpin for CacheMissReason
impl UnsafeUnpin for CacheMissReason
impl UnwindSafe for CacheMissReason
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.