pub struct FileTransactionStore { /* private fields */ }Expand description
Durable cross-process transaction state using only the Rust standard library.
Each operation takes a short process-local mutex and an OS file lock, refreshes only unseen append-log bytes, validates checksums and lifecycle edges, then synchronizes at most one complete record. At the configured byte ceiling it compacts into the inactive log and switches a fixed-size, double-buffered control record. Monty execution, VFS work, and host commit operations never run while either lock is held.
Implementations§
Source§impl FileTransactionStore
impl FileTransactionStore
Sourcepub fn open(
data_directory: impl AsRef<Path>,
config: FileStoreConfig,
) -> Result<Self, TransactionStoreError>
pub fn open( data_directory: impl AsRef<Path>, config: FileStoreConfig, ) -> Result<Self, TransactionStoreError>
Open or initialize a durable transaction store below data_directory.
§Errors
Returns an error for filesystem/lock failures, invalid bounds, corruption, an invalid persisted state edge, or a configured size ceiling.
Sourcepub fn open_in(
data_directory: &DataDirectory,
config: FileStoreConfig,
) -> Result<Self, TransactionStoreError>
pub fn open_in( data_directory: &DataDirectory, config: FileStoreConfig, ) -> Result<Self, TransactionStoreError>
Open or initialize a durable transaction store below a pinned capability.
§Errors
Returns an error for invalid bounds, filesystem/lock failures, corruption, an invalid persisted state edge, or a configured size ceiling.
Sourcepub fn active_log_path(&self) -> Result<PathBuf, TransactionStoreError>
pub fn active_log_path(&self) -> Result<PathBuf, TransactionStoreError>
Return the currently active state-log path for diagnostics and backup tooling.
§Errors
Returns an error if the cross-process lock or compact-log control journal cannot be read safely.
Trait Implementations§
Source§impl Clone for FileTransactionStore
impl Clone for FileTransactionStore
Source§fn clone(&self) -> FileTransactionStore
fn clone(&self) -> FileTransactionStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more