Skip to main content

XactStatusOracle

Trait XactStatusOracle 

Source
pub trait XactStatusOracle {
    // Required method
    fn status(&self, version: u64) -> XactStatus;
}
Expand description

v7.37.15 (Phase C.2) — the visibility oracle: maps a version id to its terminal XactStatus.

spg-storage (no_std) defines the contract; the real registry (a sharded DashMap<u64, XactStatus>) lives in spg-engine and implements this. Kept as a trait so the visibility rule stays in storage next to Snapshot::visible without storage depending on the engine’s concurrency primitives.

Required Methods§

Source

fn status(&self, version: u64) -> XactStatus

Terminal status of version. Implementations return XactStatus::Committed for any version they no longer track (pruned below oldest_active, or frozen) — those are, by definition, committed-and-old.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl XactStatusOracle for AllCommitted

Source§

impl XactStatusOracle for Engine

v7.37.15 (Phase C.2) — the engine is its own visibility oracle. Scans hold &Engine while reading, so a scan site can pass self as the XactStatusOracle alongside its Snapshot when the visibility gate migrates from visible to visible_with_status (next Phase C step). Delegates to Engine::xact_status.