pub trait JournalSource: Send + Sync {
// Required method
fn replay_from(
&self,
cursor: &str,
max_events: usize,
) -> Result<Vec<(String, TraverseEvent)>, JournalError>;
}Expand description
Read-side of a durable journal: serves replay for cursors the live
broker’s in-memory window no longer retains (spec 066 FR-005, FR-008).
RwLock<DurableEventJournal> is the production implementation, shared
with the write path via DurableBroker::open; tests inject a stub for
write-path-only scenarios that never exercise replay.
Required Methods§
Sourcefn replay_from(
&self,
cursor: &str,
max_events: usize,
) -> Result<Vec<(String, TraverseEvent)>, JournalError>
fn replay_from( &self, cursor: &str, max_events: usize, ) -> Result<Vec<(String, TraverseEvent)>, JournalError>
Replay up to max_events events strictly after cursor.
§Errors
Returns JournalError when the cursor is malformed or expired, or
the durable read fails.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".