pub trait BatchableTransformer: Send + Sync {
    // Required method
    fn batch_transform<'life0, 'async_trait>(
        &'life0 self,
        nodes: Vec<Node>,
    ) -> Pin<Box<dyn Future<Output = IndexingStream> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn concurrency(&self) -> Option<usize> { ... }
}
Expand description

Transforms batched single nodes into streams of nodes

Required Methods§

source

fn batch_transform<'life0, 'async_trait>( &'life0 self, nodes: Vec<Node>, ) -> Pin<Box<dyn Future<Output = IndexingStream> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Transforms a batch of nodes into a stream of nodes

Provided Methods§

source

fn concurrency(&self) -> Option<usize>

Overrides the default concurrency of the pipeline

Trait Implementations§

Implementors§

source§

impl<F> BatchableTransformer for F
where F: Fn(Vec<Node>) -> IndexingStream + Send + Sync,

Use a closure as a batchable transformer