pub fn apply_transaction(
transaction: &AppendTransaction,
existing: Option<&StoredSession>,
grant_id_in_use: impl Fn(GrantId) -> bool,
) -> Result<(StoredSession, AppendOutcome), SessionStoreError>Expand description
Validates a transaction and applies it to an existing stored view.
grant_id_in_use returns whether a grant id is already issued across every
session (the in-memory store checks its map; the SQLite store queries its
grant-journal table). Returns the new stored view and the append outcome.
ยงErrors
Returns a typed store error for empty transactions, cross-session records, stale expected sequences, stale journal revisions, duplicate grant ids, or reducer/artifact validation failures.