Skip to main content

SinkOperator

Trait SinkOperator 

Source
pub trait SinkOperator: Send + Sync {
    // Required methods
    fn consume<'life0, 'async_trait>(
        &'life0 mut self,
        messages: Vec<StreamMessage>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn flush<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn name(&self) -> &str;
}
Expand description

A sink operator that consumes stream elements.

Required Methods§

Source

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

Consume a batch of elements.

Source

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

Flush any buffered data.

Source

fn name(&self) -> &str

Get the sink name.

Implementors§