pub struct MemoryVersionStore { /* private fields */ }Expand description
Reference storage for the record contract, without physical durability.
Snapshot admission, conditional validation and publication share one mutex; no lock is retained between calls. SQL execution and transaction-local overlays are deliberately outside this committed-record owner.
Implementations§
Source§impl MemoryVersionStore
impl MemoryVersionStore
Sourcepub fn reclaim_tombstones(
&self,
request: &TombstoneReclamationRequest<'_>,
control: &StorageReadControl,
) -> VersionResult<TombstoneReclamationStep>
pub fn reclaim_tombstones( &self, request: &TombstoneReclamationRequest<'_>, control: &StorageReadControl, ) -> VersionResult<TombstoneReclamationStep>
Reference implementation of atomic prefix retirement, sharing snapshot and write admission. Every allocation completes before published state is changed.
Source§impl MemoryVersionStore
impl MemoryVersionStore
pub fn new(memory: &MemoryBudget) -> Self
pub fn snapshot(&self) -> VersionResult<MemoryRecordSnapshot>
Sourcepub fn commit(
&self,
writes: &[RecordWrite<'_>],
control: &StorageReadControl,
) -> VersionResult<CommitSequence>
pub fn commit( &self, writes: &[RecordWrite<'_>], control: &StorageReadControl, ) -> VersionResult<CommitSequence>
Validate every original revision before publishing any record.
Values and replacement histories are prepared privately. Failed validation, allocation or cancellation preserves all published records.
pub fn commit_prepared( &self, commit: &PreparedRecordCommit, control: &StorageReadControl, ) -> VersionResult<CommitSequence>
Sourcepub fn reclaim(&self) -> VersionResult<usize>
pub fn reclaim(&self) -> VersionResult<usize>
Reclaim histories under the same gate that admits new snapshots.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryVersionStore
impl !UnwindSafe for MemoryVersionStore
impl Freeze for MemoryVersionStore
impl Send for MemoryVersionStore
impl Sync for MemoryVersionStore
impl Unpin for MemoryVersionStore
impl UnsafeUnpin for MemoryVersionStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more