Operator

Trait Operator 

Source
pub trait Operator: Send {
    // Required method
    fn on_element<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        ctx: &'life1 mut dyn Context,
        record: Record,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn on_watermark<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        _ctx: &'life1 mut dyn Context,
        _wm: Watermark,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn on_timer<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        _ctx: &'life1 mut dyn Context,
        _when: EventTime,
        _key: Option<Vec<u8>>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

Core operator interface. Override on_watermark/on_timer if needed.

Required Methods§

Source

fn on_element<'life0, 'life1, 'async_trait>( &'life0 mut self, ctx: &'life1 mut dyn Context, record: Record, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

Source

fn on_watermark<'life0, 'life1, 'async_trait>( &'life0 mut self, _ctx: &'life1 mut dyn Context, _wm: Watermark, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn on_timer<'life0, 'life1, 'async_trait>( &'life0 mut self, _ctx: &'life1 mut dyn Context, _when: EventTime, _key: Option<Vec<u8>>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§