pactole_core/traits.rs
1use crate::models::Journal;
2use std::error::Error;
3
4/// Reads a complete journal from a storage backend.
5pub trait ReadableStorage {
6 /// Error returned by the storage backend.
7 type Error: Error;
8
9 /// Reads the full journal from the underlying storage.
10 fn journal(&self) -> Result<Journal, Self::Error>;
11}