Skip to main content

ResultSequenceCounter

Trait ResultSequenceCounter 

Source
pub trait ResultSequenceCounter: Send + Sync {
    // Required methods
    fn apply_sequence<'life0, 'life1, 'async_trait>(
        &'life0 self,
        sequence: u64,
        source_change_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), IndexError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_sequence<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<ResultSequence, IndexError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Tracks the monotonic output sequence number for a query’s result stream.

Each time a query emits a result batch, the sequence is incremented and persisted so that downstream consumers (reactions) can detect ordering and gaps. This is separate from the source checkpoint tracking in CheckpointStore.

Required Methods§

Source

fn apply_sequence<'life0, 'life1, 'async_trait>( &'life0 self, sequence: u64, source_change_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), IndexError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_sequence<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ResultSequence, IndexError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§