pub trait WalWriter {
// Required methods
fn append(&mut self, event: &WalEvent) -> Result<(), WalWriterError>;
fn flush(&mut self) -> Result<(), WalWriterError>;
fn close(self) -> Result<(), WalWriterError>;
}Expand description
A writer that can append events to the WAL.
Required Methods§
Sourcefn append(&mut self, event: &WalEvent) -> Result<(), WalWriterError>
fn append(&mut self, event: &WalEvent) -> Result<(), WalWriterError>
Append an event to the WAL.
Sourcefn flush(&mut self) -> Result<(), WalWriterError>
fn flush(&mut self) -> Result<(), WalWriterError>
Flush pending writes to durable storage.
Sourcefn close(self) -> Result<(), WalWriterError>
fn close(self) -> Result<(), WalWriterError>
Close the writer, releasing any resources.