pub trait LogSource<E>: HasCursors {
// Required method
fn read_since<'life0, 'async_trait>(
&'life0 self,
peer: Uuid,
from: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<(u64, DecodedEntry<E>)>, SyncError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
The pull side of replication: publish progress as cursors, hand back entries past a position.
A driver diffs a peer’s cursors against its own and pulls only the gap.
Keeping the cheap cursor digest separate from the payload avoids a thundering
herd — many holders advertise “I have X” for almost nothing, and the receiver
fetches X once. Object-safe, like LogProcessor.
Required Methods§
Sourcefn read_since<'life0, 'async_trait>(
&'life0 self,
peer: Uuid,
from: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<(u64, DecodedEntry<E>)>, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_since<'life0, 'async_trait>(
&'life0 self,
peer: Uuid,
from: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<(u64, DecodedEntry<E>)>, SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
A bounded batch of peer’s entries at or after from, ascending
(expunged markers included). Empty means drained at from; the caller
loops with an advancing from until then.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".