pub trait AtomicJournalStore {
// Required methods
fn read(
&mut self,
keys: &[String],
) -> Result<Vec<JournalVersion>, LinkError>;
fn compare_exchange(
&mut self,
keys: &[String],
expected: &[JournalVersion],
updates: &[Option<Vec<String>>],
) -> Result<bool, LinkError>;
// Provided method
fn supports_durable_flush(&self) -> bool { ... }
}Expand description
All keys in read must be read at one linearizable serialization point.
CAS checks EVERY selected generation and writes all updates atomically.
Never retry a mutation on transport errors: its outcome may be unknown.
Required Methods§
fn read(&mut self, keys: &[String]) -> Result<Vec<JournalVersion>, LinkError>
fn compare_exchange( &mut self, keys: &[String], expected: &[JournalVersion], updates: &[Option<Vec<String>>], ) -> Result<bool, LinkError>
Provided Methods§
fn supports_durable_flush(&self) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".