Skip to main content

WALFrame

Struct WALFrame 

Source
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_seqchange.seq: latter is the bundle’s mutations cursor (DS-14 T1); former is the WAL tier’s own cursor (this record’s position in the WAL stream). Replay uses frame_seq for ordering; change.seq is only relevant for bundle-level cursor restoration.
  • Self::frame_t_nschange.t_ns: latter is wall-clock at mutation entry; former is wall-clock at WAL-write time. Under debounced tiers they differ by debounce_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: WalTag

Bridge 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: Lifecycle

Lifecycle scope (DS-14 PART 4). Determines replay phase ordering.

§path: String

Target node / bundle path (per-graph qualified path).

§change: BaseChange<T>

DS-14 universal BaseChange<T> envelope — structure-tagged delta.

§frame_seq: u64

WAL-tier monotonic cursor (uniquely owned by the WAL tier writer).

§frame_t_ns: u64

Wall-clock at WAL-write time (matches wall_clock_ns()).

§checksum: String

SHA-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: u32

Codec 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<T: Clone> Clone for WALFrame<T>

Source§

fn clone(&self) -> WALFrame<T>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for WALFrame<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

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>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T: PartialEq> PartialEq for WALFrame<T>

Source§

fn eq(&self, other: &WALFrame<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> Serialize for WALFrame<T>
where T: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<T: Eq> Eq for WALFrame<T>

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,