pub trait FutureQueueConsumer: Send + Sync {
// Required methods
fn on_items_due<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn on_error<'life0, 'async_trait>(
&'life0 self,
error: Box<dyn Error + Send + Sync>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn now(&self) -> u64;
}Required Methods§
Sourcefn on_items_due<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_items_due<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called when the polling loop determines items are due.
The consumer is responsible for calling ContinuousQuery::process_due_futures()
internally, which atomically pops and processes within a session.