Skip to main content

StreamOperator

Trait StreamOperator 

Source
pub trait StreamOperator: Send + Sync {
    // Required methods
    fn apply<'life0, 'async_trait>(
        &'life0 mut self,
        event: StreamEvent,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<StreamEvent>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn stats(&self) -> OperatorStats;
    fn reset(&mut self);
}
Expand description

Stream operator trait for composable transformations

Required Methods§

Source

fn apply<'life0, 'async_trait>( &'life0 mut self, event: StreamEvent, ) -> Pin<Box<dyn Future<Output = Result<Vec<StreamEvent>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Apply operator to an event

Source

fn stats(&self) -> OperatorStats

Get operator statistics

Source

fn reset(&mut self)

Reset operator state

Implementors§