pub struct StateChangelogEntry {
pub epoch: u64,
pub key_hash: u64,
pub mmap_offset: u64,
pub value_len: u32,
/* private fields */
}Expand description
Zero-allocation changelog entry for Ring 0 hot path.
This struct is designed for minimal memory footprint (32 bytes) and cache-efficient access. It stores offset references into the mmap state store rather than copying key/value data.
§Memory Layout
The struct is repr(C) to ensure predictable memory layout:
epoch: 8 bytes - Logical epoch number for orderingkey_hash: 8 bytes -FxHashof the key for quick comparisonmmap_offset: 8 bytes - Offset into the mmap state storevalue_len: 4 bytes - Length of the value (0 for deletes)op: 1 byte - Operation type (Put/Delete)_padding: 3 bytes - Alignment padding
Fields§
§epoch: u64Logical epoch number for ordering changelog entries.
key_hash: u64FxHash of the key (for deduplication and lookup).
mmap_offset: u64Offset into the mmap state store where value is stored.
value_len: u32Length of the value in bytes (0 for Delete operations).
Implementations§
Source§impl StateChangelogEntry
impl StateChangelogEntry
Trait Implementations§
Source§impl Clone for StateChangelogEntry
impl Clone for StateChangelogEntry
Source§fn clone(&self) -> StateChangelogEntry
fn clone(&self) -> StateChangelogEntry
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 moreSource§impl Debug for StateChangelogEntry
impl Debug for StateChangelogEntry
impl Copy for StateChangelogEntry
Auto Trait Implementations§
impl Freeze for StateChangelogEntry
impl RefUnwindSafe for StateChangelogEntry
impl Send for StateChangelogEntry
impl Sync for StateChangelogEntry
impl Unpin for StateChangelogEntry
impl UnsafeUnpin for StateChangelogEntry
impl UnwindSafe for StateChangelogEntry
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.