pub enum CacheLoadRejection {
LegacyUnframed,
Truncated,
BadCrc,
UnsupportedVersion(u16),
TableIdMismatch {
expected: u64,
found: u64,
},
SchemaIdMismatch {
expected: u64,
found: u64,
},
GenerationMismatch {
expected: u64,
found: u64,
},
KeyMismatch {
expected: u64,
found: u64,
},
MissingCipher,
DecryptionFailed,
PayloadInvalid,
}Expand description
Why a persisted frame was rejected by decode_persisted_entry. The
caller maps each variant to a rejection metric / log line.
Variants§
LegacyUnframed
File does not start with the MLCP magic — legacy unframed data.
Truncated
File is too small to contain a valid header / payload / trailer.
BadCrc
Stored CRC does not match the body bytes.
UnsupportedVersion(u16)
Format version is not one we can read.
TableIdMismatch
Table identity does not match the open table.
SchemaIdMismatch
Schema identity does not match the open table.
GenerationMismatch
Logical generation does not exactly match the open table’s current epoch (both older and future generations are rejected).
KeyMismatch
The cache key embedded in the header does not match the on-disk file name (e.g. a file got renamed but its header still references the old key — the safest response is to reject the whole entry).
MissingCipher
File claimed an encrypted payload but a cipher was not provided.
DecryptionFailed
Cipher was provided but the GCM tag check failed (wrong key, bit rot).
PayloadInvalid
Frame decoded cleanly but the inner payload did not deserialize.
Trait Implementations§
Source§impl Clone for CacheLoadRejection
impl Clone for CacheLoadRejection
Source§fn clone(&self) -> CacheLoadRejection
fn clone(&self) -> CacheLoadRejection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CacheLoadRejection
impl Debug for CacheLoadRejection
Source§impl Display for CacheLoadRejection
impl Display for CacheLoadRejection
impl Eq for CacheLoadRejection
Source§impl Error for CacheLoadRejection
impl Error for CacheLoadRejection
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for CacheLoadRejection
impl PartialEq for CacheLoadRejection
impl StructuralPartialEq for CacheLoadRejection
Auto Trait Implementations§
impl Freeze for CacheLoadRejection
impl RefUnwindSafe for CacheLoadRejection
impl Send for CacheLoadRejection
impl Sync for CacheLoadRejection
impl Unpin for CacheLoadRejection
impl UnsafeUnpin for CacheLoadRejection
impl UnwindSafe for CacheLoadRejection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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