pub trait Operator<In, Out>: Send {
// Required method
fn process<'life0, 'async_trait>(
&'life0 mut self,
record: Record<In>,
) -> Pin<Box<dyn Future<Output = StreamResult<Vec<Record<Out>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn init<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = StreamResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn on_window_trigger<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = StreamResult<Vec<Record<Out>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = StreamResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Operator trait defines the interface for stream processing operators
Required Methods§
Provided Methods§
Sourcefn init<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = StreamResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn init<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = StreamResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initialize the operator
Sourcefn on_window_trigger<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = StreamResult<Vec<Record<Out>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_window_trigger<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = StreamResult<Vec<Record<Out>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called when a window is triggered (if windowing is enabled)