pub trait ResumptionFrontierCalculator<T> {
    type State;

    fn initialize_state<'life0, 'life1, 'async_trait>(
        &'life0 self,
        client_cache: &'life1 mut PersistClientCache
    ) -> Pin<Box<dyn Future<Output = Self::State> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn calculate_resumption_frontier<'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 mut Self::State
    ) -> Pin<Box<dyn Future<Output = Antichain<T>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }
Expand description

A trait that is used to calculate safe resumption frontiers for a source.

Use ResumptionFrontierCalculator::initialize_state for creating an opaque state that you should keep around. Then repeatedly call ResumptionFrontierCalculator::calculate_resumption_frontier with the state to efficiently calculate an up-to-date frontier.

Required Associated Types

Opaque state that a ResumptionFrontierCalculator needs to repeatedly (and efficiently) calculate a resumption frontier.

Required Methods

Creates an opaque state type that can be used to efficiently calculate a new resumption frontier when needed.

Calculates a new, safe resumption frontier.

Implementors