Processor

Trait Processor 

Source
pub trait Processor {
    type InputType;
    type OutputType;

    // Required method
    fn process<'life0, 'async_trait>(
        &'life0 mut self,
        data: Vec<Self::InputType>,
        metrics: Arc<MetricsCollection>,
    ) -> Pin<Box<dyn Future<Output = IndexerResult<Self::OutputType>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generic processing trait for transforming batches of inputs into an output, with access to metrics.

Required Associated Types§

Required Methods§

Source

fn process<'life0, 'async_trait>( &'life0 mut self, data: Vec<Self::InputType>, metrics: Arc<MetricsCollection>, ) -> Pin<Box<dyn Future<Output = IndexerResult<Self::OutputType>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Process a batch of inputs and optionally produce an output.

Implementors§