pub trait AuditLogPersistence: Send + Sync {
// Required methods
fn load(
&self,
expected_object: ObjectIdentifier,
) -> Result<Option<AuditLogSnapshot>, Error>;
fn commit(&self, snapshot: &AuditLogSnapshot) -> Result<(), Error>;
}Expand description
Application-owned persistence port for one AuditLog object.
The object calls it from its writer thread, one call at a time. A commit lands in storage a moment before the log serves it: see storage leads the served state.
Required Methods§
Sourcefn load(
&self,
expected_object: ObjectIdentifier,
) -> Result<Option<AuditLogSnapshot>, Error>
fn load( &self, expected_object: ObjectIdentifier, ) -> Result<Option<AuditLogSnapshot>, Error>
Load the newest valid compatible snapshot, or None if neither slot exists.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".