pub struct StoredSession {
pub records: Vec<RecordEnvelope>,
pub approval_artifacts: Vec<ApprovalArtifactEntry>,
pub grant_journal: Vec<GrantJournalEntry>,
pub artifacts: ArtifactState,
pub journal_revision: u64,
pub reducer: SessionReducer,
}Expand description
Immutable view of one stored session’s durable facts.
A store loads or reconstructs this view before calling apply_transaction.
Fields§
§records: Vec<RecordEnvelope>Canonical source records in authoritative sequence order.
approval_artifacts: Vec<ApprovalArtifactEntry>Rich approval artifacts linked to canonical approval transitions.
grant_journal: Vec<GrantJournalEntry>Append-only grant journal facts.
artifacts: ArtifactStateDerived authorization state rebuilt from the journals.
journal_revision: u64Current side-journal revision.
reducer: SessionReducerIncremental canonical reducer rebuilt once when durable facts are loaded.
Implementations§
Source§impl StoredSession
impl StoredSession
Sourcepub fn from_durable_facts(
records: Vec<RecordEnvelope>,
approval_artifacts: Vec<ApprovalArtifactEntry>,
grant_journal: Vec<GrantJournalEntry>,
) -> Result<Self, SessionStoreError>
pub fn from_durable_facts( records: Vec<RecordEnvelope>, approval_artifacts: Vec<ApprovalArtifactEntry>, grant_journal: Vec<GrantJournalEntry>, ) -> Result<Self, SessionStoreError>
Rebuilds one validated stored session from durable facts.
§Errors
Returns a replay error when canonical records are corrupt.
Sourcepub fn snapshot(&self) -> SessionSnapshot
pub fn snapshot(&self) -> SessionSnapshot
Builds a read snapshot from this stored view.
Sourcepub fn state(&self) -> MaterializedSessionState
pub fn state(&self) -> MaterializedSessionState
Replays the durable records to rebuild materialized state.
§Panics
Panics when the stored records are corrupt; durable stores validate every transaction before persistence.
Trait Implementations§
Source§impl Clone for StoredSession
impl Clone for StoredSession
Source§fn clone(&self) -> StoredSession
fn clone(&self) -> StoredSession
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more