pub struct PreparedRecoveryInputSnapshot { /* private fields */ }Expand description
Exact, store-owned observation of every nonterminal input row that can affect durable-tail recovery for one logical runtime.
Runtime-store implementations construct this value from an authoritative,
complete read of their persisted nonterminal-input set. Every row token
must be the canonical sha256:<lowercase hex> digest of the exact stored
row representation that the backend will compare in its atomic recovery
commit. An empty row vector is not an unproved absence: it produces a
domain-separated absence token scoped to runtime_id.
The exact set token is durable evidence of what was classified. A
recovery-capable backend MUST also compare Self::input_set_revision
against its current store-owned generation inside the transaction that
applies recovery. A row inserted, removed, terminalized, reopened, or
byte-modified after this observation must make that transaction fail with
RuntimeStoreError::RecoveryInputSetConflict without rescanning the set.
Implementations§
Source§impl PreparedRecoveryInputSnapshot
impl PreparedRecoveryInputSnapshot
Sourcepub fn from_exact_nonterminal_rows(
runtime_id: LogicalRuntimeId,
input_set_revision: RecoveryInputSetRevision,
rows: Vec<(StoredInputState, String)>,
) -> Result<Self, RuntimeStoreError>
pub fn from_exact_nonterminal_rows( runtime_id: LogicalRuntimeId, input_set_revision: RecoveryInputSetRevision, rows: Vec<(StoredInputState, String)>, ) -> Result<Self, RuntimeStoreError>
Seal an authoritative complete set of exact nonterminal input rows.
The constructor canonicalizes row order by InputId, rejects
duplicates, terminal rows, and non-canonical exact-row tokens, then
hashes the runtime id, row count, and every (input_id, row_token)
pair with length framing under meerkat.recovery-input-set.v1.
This constructor validates representation, not completeness. The
RuntimeStore implementation owns the obligation to select all and
only persisted nonterminal rows for the supplied runtime and to observe
input_set_revision in the same backend snapshot as those rows.
Sourcepub fn runtime_id(&self) -> &LogicalRuntimeId
pub fn runtime_id(&self) -> &LogicalRuntimeId
Logical runtime whose complete nonterminal set was observed.
Sourcepub fn input_set_revision(&self) -> RecoveryInputSetRevision
pub fn input_set_revision(&self) -> RecoveryInputSetRevision
Store-owned input-set revision observed with the exact rows.
Sourcepub fn exact_set_token(&self) -> &str
pub fn exact_set_token(&self) -> &str
Exact set/absence token sealed into prepared recovery evidence.
Sourcepub fn into_parts(
self,
) -> (Vec<(StoredInputState, String)>, RecoveryInputSetRevision, String)
pub fn into_parts( self, ) -> (Vec<(StoredInputState, String)>, RecoveryInputSetRevision, String)
Consume the snapshot into canonical rows, store revision, and exact set/absence token.
Trait Implementations§
Source§impl Clone for PreparedRecoveryInputSnapshot
impl Clone for PreparedRecoveryInputSnapshot
Source§fn clone(&self) -> PreparedRecoveryInputSnapshot
fn clone(&self) -> PreparedRecoveryInputSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more