Skip to main content

Punctuator

Trait Punctuator 

Source
pub trait Punctuator<K: Send, V: Send>: Send + 'static {
    // Required method
    fn punctuate<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 mut self,
        ctx: &'life1 mut ProcessorContext<'life2, 'life3, K, V>,
        timestamp: i64,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}
Expand description

A periodic callback. You implement it on a user struct, as you do with Processor. It shares mutable state with its owning processor through an Arc<Mutex<_>>.

Required Methods§

Source

fn punctuate<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, ctx: &'life1 mut ProcessorContext<'life2, 'life3, K, V>, timestamp: i64, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Fire at timestamp. For a stream-time schedule this is the scheduled time. For a wall-clock schedule it is the clock’s current time. The callback may forward through ctx and may use the state stores.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§