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§
Sourcefn 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 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
Sourcefn stats(&self) -> OperatorStats
fn stats(&self) -> OperatorStats
Get operator statistics