Skip to main content

TransitionLogStore

Trait TransitionLogStore 

Source
pub trait TransitionLogStore {
    // Required methods
    fn append_log_entry(&mut self, entry: &str) -> Result<(), LinkError>;
    fn read_log_entries(&mut self) -> Result<Vec<String>, LinkError>;
    fn flush_log(&mut self) -> Result<(), LinkError>;
}
Expand description

Append-only store of serialized transitions and recovery markers.

Required Methods§

Source

fn append_log_entry(&mut self, entry: &str) -> Result<(), LinkError>

Appends one entry. Entries never contain newlines.

Source

fn read_log_entries(&mut self) -> Result<Vec<String>, LinkError>

Reads every entry back, oldest first.

Source

fn flush_log(&mut self) -> Result<(), LinkError>

Makes every appended entry durable.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§