Skip to main content

SourceOperator

Trait SourceOperator 

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

A source operator that produces stream elements.

Required Methods§

Source

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

Produce the next batch of elements.

Source

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

Check if the source has more data.

Source

fn name(&self) -> &str

Get the source name.

Implementors§