Skip to main content

SnapshotWriter

Trait SnapshotWriter 

Source
pub trait SnapshotWriter {
    // Required methods
    fn write(&mut self, snapshot: &Snapshot) -> Result<(), SnapshotWriterError>;
    fn flush(&mut self) -> Result<(), SnapshotWriterError>;
    fn close(self) -> Result<(), SnapshotWriterError>;
}
Expand description

A snapshot writer that persists state to storage.

Required Methods§

Source

fn write(&mut self, snapshot: &Snapshot) -> Result<(), SnapshotWriterError>

Write a snapshot to storage.

Source

fn flush(&mut self) -> Result<(), SnapshotWriterError>

Flush pending writes to durable storage.

Source

fn close(self) -> Result<(), SnapshotWriterError>

Close the writer, releasing any resources.

Implementors§