Skip to main content

StreamOperator

Trait StreamOperator 

Source
pub trait StreamOperator: Send + Sync {
    // Required methods
    fn process<'life0, 'async_trait>(
        &'life0 mut self,
        message: StreamMessage,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<StreamMessage>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn name(&self) -> &str;

    // Provided methods
    fn initialize<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn finalize<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Base trait for stream operators.

Required Methods§

Source

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

Process a stream message.

Source

fn name(&self) -> &str

Get the operator name.

Provided Methods§

Source

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

Initialize the operator.

Source

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

Finalize the operator.

Implementors§