pub trait DualProtectedCommitStore {
type Slot: ProtectedGenerationSlot;
// Required methods
fn slot0(&self) -> Option<&Self::Slot>;
fn slot1(&self) -> Option<&Self::Slot>;
// Provided methods
fn is_uninitialized(&self) -> bool { ... }
fn authoritative_slot(
&self,
) -> Result<AuthoritativeSlot<'_, Self::Slot>, CommitRecoveryError> { ... }
fn inactive_slot_index(&self) -> CommitSlotIndex { ... }
}Expand description
DualProtectedCommitStore
Physical store with two protected generation slots.
This is an advanced low-level API for custom persistence/recovery integrations. Normal allocation flows recover and commit ledgers through the higher-level ledger commit APIs.
Required Associated Types§
Sourcetype Slot: ProtectedGenerationSlot
type Slot: ProtectedGenerationSlot
Protected slot record type.
Required Methods§
Provided Methods§
Sourcefn is_uninitialized(&self) -> bool
fn is_uninitialized(&self) -> bool
Return true when no commit slot has ever been written.
Return the highest-generation valid physical slot.
Sourcefn inactive_slot_index(&self) -> CommitSlotIndex
fn inactive_slot_index(&self) -> CommitSlotIndex
Return the slot that should receive the next staged generation write.
The result is derived from validated recovery state. It does not trust a separate current-pointer/header field.