pub trait LogPersistence<R>: Send + Sync {
// Required methods
fn load(
&self,
expected_object: ObjectIdentifier,
) -> Result<Option<LogSnapshot<R>>, Error>;
fn commit(&self, snapshot: &LogSnapshot<R>) -> Result<(), Error>;
}Expand description
Application-owned storage for one log’s LogSnapshot.
The log calls load once, as it opens, and commit from its writer
thread, one call at a time.
Required Methods§
Sourcefn load(
&self,
expected_object: ObjectIdentifier,
) -> Result<Option<LogSnapshot<R>>, Error>
fn load( &self, expected_object: ObjectIdentifier, ) -> Result<Option<LogSnapshot<R>>, Error>
Load the newest valid snapshot for expected_object, or None when
storage holds none yet.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".