Skip to main content

AuditPersistence

Trait AuditPersistence 

Source
pub trait AuditPersistence: Send + Sync {
    // Required methods
    fn save(&self, entries: &[TrailEntry]) -> Result<(), Error>;
    fn load(&self) -> Result<Vec<TrailEntry>, Error>;
}
Expand description

Trait for persisting audit trail entries.

Implement this to integrate with your storage backend (filesystem, database, object store, etc.).

Required Methods§

Source

fn save(&self, entries: &[TrailEntry]) -> Result<(), Error>

Save entries to persistent storage.

Source

fn load(&self) -> Result<Vec<TrailEntry>, Error>

Load entries from persistent storage.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§