pub trait Log: Sequence {
// Required methods
fn get_batch(
&self,
sequence_number: u64,
) -> impl Future<Output = Result<Option<Vec<(Bytes, Bytes)>>, String>> + Send;
fn oldest_retained_batch(
&self,
) -> impl Future<Output = Result<Option<u64>, String>> + Send;
}Expand description
Retained per-sequence batch-log access for stream replay and lookups.
Required Methods§
Sourcefn get_batch(
&self,
sequence_number: u64,
) -> impl Future<Output = Result<Option<Vec<(Bytes, Bytes)>>, String>> + Send
fn get_batch( &self, sequence_number: u64, ) -> impl Future<Output = Result<Option<Vec<(Bytes, Bytes)>>, String>> + Send
Return the (key, value) pairs written by the put_batch call that was
assigned sequence_number. Return Ok(None) when the batch is not
available from this log.
Engines that don’t retain a log return Ok(None) unconditionally,
which disables GetBatch and since-cursored Subscribe for that
deployment.
The stream service maps unavailable batches to BATCH_NOT_FOUND when
they are beyond the visible sequence frontier and BATCH_EVICTED
otherwise.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".