pub struct WALFrame<T> {
pub t: WalTag,
pub lifecycle: Lifecycle,
pub path: String,
pub change: BaseChange<T>,
pub frame_seq: u64,
pub frame_t_ns: u64,
pub checksum: String,
pub format_version: u32,
}Expand description
On-disk WAL frame (DS-14-storage Q1 lock).
Two seq fields and two timestamp fields are intentional:
Self::frame_seq≠change.seq: latter is the bundle’smutationscursor (DS-14 T1); former is the WAL tier’s own cursor (this record’s position in the WAL stream). Replay usesframe_seqfor ordering;change.seqis only relevant for bundle-level cursor restoration.Self::frame_t_ns≠change.t_ns: latter is wall-clock at mutation entry; former is wall-clock at WAL-write time. Under debounced tiers they differ bydebounce_ms.
The bridge wire format (DS-14 PART 5 worker bridge) is the schema-narrowed
subset { t, lifecycle, path, change } — this struct is the
persistence-tier superset (DS-14-storage L3 lock).
Fields§
§t: WalTagBridge tag — discriminator shared with the DS-14 worker-bridge wire
format. Always "c"; allocated as String for parity with the TS
wire shape (TS uses a literal "c" value).
lifecycle: LifecycleLifecycle scope (DS-14 PART 4). Determines replay phase ordering.
path: StringTarget node / bundle path (per-graph qualified path).
change: BaseChange<T>DS-14 universal BaseChange<T> envelope — structure-tagged delta.
frame_seq: u64WAL-tier monotonic cursor (uniquely owned by the WAL tier writer).
frame_t_ns: u64Wall-clock at WAL-write time (matches wall_clock_ns()).
checksum: StringSHA-256 over the canonical-JSON of the frame body sans checksum,
encoded as a 64-char lowercase hex string. Hex (vs raw bytes) keeps
the wire format JSON-codec-friendly. M4.A parity-fixture asserts
byte-equivalence against the TS impl.
format_version: u32Codec version tag. All M4.A frames are implicitly version 1
(JSON codec). Defaults to 1 for backward-compatible deserialization
of frames written before this field was added.
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for WALFrame<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for WALFrame<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<T: PartialEq> PartialEq for WALFrame<T>
impl<T: PartialEq> PartialEq for WALFrame<T>
impl<T: Eq> Eq for WALFrame<T>
impl<T> StructuralPartialEq for WALFrame<T>
Auto Trait Implementations§
impl<T> Freeze for WALFrame<T>where
T: Freeze,
impl<T> RefUnwindSafe for WALFrame<T>where
T: RefUnwindSafe,
impl<T> Send for WALFrame<T>where
T: Send,
impl<T> Sync for WALFrame<T>where
T: Sync,
impl<T> Unpin for WALFrame<T>where
T: Unpin,
impl<T> UnsafeUnpin for WALFrame<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for WALFrame<T>where
T: UnwindSafe,
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.