pub trait TransactionalStore: Store + ManifestStore {
// Provided methods
fn supports_transactions(&self) -> bool { ... }
fn commit_transaction(
&self,
_node_writes: &[TransactionNodeWrite],
_root_conditions: &[RootCondition],
_root_writes: &[RootWrite],
) -> Result<TransactionUpdate, Error> { ... }
}Expand description
Store support for strict atomic transaction commits.
Provided Methods§
Sourcefn supports_transactions(&self) -> bool
fn supports_transactions(&self) -> bool
Whether this backend satisfies the strict transaction contract.
Returning true promises that root conditions are evaluated against one
linearizable backend state across threads, handles, and processes that
share the store; conflicting commits expose no root writes; all root
writes in an applied commit become visible atomically; and every node
referenced by an applied root is durably readable before success is
acknowledged. Implementations may retain unreachable content-addressed
node writes after an error because those nodes do not affect visibility.
Sourcefn commit_transaction(
&self,
_node_writes: &[TransactionNodeWrite],
_root_conditions: &[RootCondition],
_root_writes: &[RootWrite],
) -> Result<TransactionUpdate, Error>
fn commit_transaction( &self, _node_writes: &[TransactionNodeWrite], _root_conditions: &[RootCondition], _root_writes: &[RootWrite], ) -> Result<TransactionUpdate, Error>
Validate root conditions, write nodes, and atomically apply root writes.
Conflict must leave every root unchanged. Applied must be returned
only after the complete root-write set and all referenced node bytes meet
the durability and visibility guarantees of Self::supports_transactions.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".