pub trait TransitionLog<T>: Send + Syncwhere
T: LinkReference,{
// Required methods
fn read_entries(&mut self) -> Result<Vec<JournalEntry<T>>, Error>;
fn append(&mut self, entry: &JournalEntry<T>) -> Result<(), Error>;
}Expand description
Storage for ordered transaction records.
A durable implementation must persist a complete record before append
succeeds, preserve append order, and reject corruption on read_entries.
An incomplete final append may be discarded. After an append error the
decorator blocks further writes until reopened, since durability is uncertain.
Use one exclusively owned journal for one exclusively owned store.
Required Methods§
Sourcefn read_entries(&mut self) -> Result<Vec<JournalEntry<T>>, Error>
fn read_entries(&mut self) -> Result<Vec<JournalEntry<T>>, Error>
Reads all complete records in append order.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".