pub struct EntryMeta {
pub hash: Hash,
pub codec: Codec,
pub flags: u8,
pub key_epoch: u32,
pub uncompressed_len: u64,
pub stored_len: u64,
}Expand description
Metadata for one stored entry (payload excluded).
Fields§
§hash: Hash§codec: Codec§flags: u8Reserved. The only legal value at format v3 is 0x00 — no bit is
assigned, now or in this change. See the module docs: flags is
deliberately left wholly unassigned rather than given a SEALED
bit, because Codec::Sealed is the sole indicator that a payload is
sealed and a second field restating the same fact is a duplicated
state that will eventually disagree with the original.
key_epoch: u32A u32 opaque key selector. Today its only interpretation is a
monotonic per-partition epoch counter; the sole legal value is 0,
since this crate has no key-wrapping concept yet. Equality only
— code that orders it (key_epoch < current_epoch) has silently
spent the future key-table-index reinterpretation and is a defect.
uncompressed_len: u64§stored_len: u64Implementations§
Source§impl EntryMeta
impl EntryMeta
Sourcepub fn validate_reserved(&self) -> Result<()>
pub fn validate_reserved(&self) -> Result<()>
Fail-closed check that every field reserved at format v3 carries its
sole legal value. Called on every entry ImmutableStore::get
hands to a caller — the boundary that decodes and trusts the
payload’s meaning. Deliberately not called on the raw byte-copy
path (append_raw, get_raw_at, rebuild_index_entries,
read_index): a meta-preserving copy relocates bytes without
interpreting what they mean, which is what keeps GC key-blind.
Trait Implementations§
impl Copy for EntryMeta
impl Eq for EntryMeta
impl StructuralPartialEq for EntryMeta
Auto Trait Implementations§
impl Forget for EntryMeta
impl Freeze for EntryMeta
impl Move for EntryMeta
impl RefUnwindSafe for EntryMeta
impl Send for EntryMeta
impl Sync for EntryMeta
impl Unpin for EntryMeta
impl UnsafeUnpin for EntryMeta
impl UnwindSafe for EntryMeta
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<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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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