pub trait SyncStorage {
    // Required method
    fn sync(&self) -> PaceResult<()>;
}
Expand description

A type of storage that can be synced to a persistent medium.

This is useful for in-memory storage that needs to be persisted to disk or a database.

Required Methods§

source

fn sync(&self) -> PaceResult<()>

Sync the storage to a persistent medium.

§Errors

This function should return an error if the storage cannot be synced.

§Returns

If the storage was synced successfully it should return Ok(()).

Implementors§