pub struct StateStore { /* private fields */ }Implementations§
Source§impl StateStore
impl StateStore
Sourcepub fn open(path: &Path) -> Result<Self>
pub fn open(path: &Path) -> Result<Self>
Open existing state, strictly (F04).
Missing or malformed state is an error, never a silently fresh timeline: forgetting recorded high-water marks would let an older bundle be served again. Valid legacy JSON is preserved. Committed snapshots must exist, match their content digest, and carry rollback marks — incomplete committed state is a recovery failure.
Sourcepub fn initialize(path: &Path) -> Result<Self>
pub fn initialize(path: &Path) -> Result<Self>
Explicitly initialize a fresh state directory (F04).
Initialization is the operator’s acknowledgment that this directory is new. It refuses an existing state file and refuses a directory holding any recovery material (snapshots, cookies, unknown files) so a partial restore can never be silently reset. Only the writer lock file is ignored when checking emptiness. Creating the directory does not by itself authorize resetting it.
pub fn get_high_water( &self, producer_id: &str, issuer_key_hash_hex: &str, ) -> Option<u64>
pub fn get_manifest_digest( &self, producer_id: &str, issuer_key_hash_hex: &str, ) -> Option<[u8; 32]>
pub fn advance( &mut self, producer_id: &str, issuer_key_hash_hex: &str, epoch: u64, manifest_digest: [u8; 32], ) -> Result<()>
pub fn check_rollback(&self, bundle: &Bundle) -> Result<()>
pub fn check_continuity(&self, bundle: &Bundle) -> Result<()>
pub fn advance_from_bundle(&mut self, bundle: &Bundle) -> Result<()>
Trait Implementations§
Source§impl Clone for StateStore
impl Clone for StateStore
Source§fn clone(&self) -> StateStore
fn clone(&self) -> StateStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more