BatchableTransformer

Trait BatchableTransformer 

Source
pub trait BatchableTransformer:
    Send
    + Sync
    + DynClone {
    type Input: Chunk;
    type Output: Chunk;

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

    // Provided methods
    fn concurrency(&self) -> Option<usize> { ... }
    fn name(&self) -> &'static str { ... }
    fn batch_size(&self) -> Option<usize> { ... }
}
Expand description

Transforms batched single nodes into streams of nodes

Required Associated Types§

Required Methods§

Source

fn batch_transform<'life0, 'async_trait>( &'life0 self, nodes: Vec<Node<Self::Input>>, ) -> Pin<Box<dyn Future<Output = IndexingStream<Self::Output>> + 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

Source

fn name(&self) -> &'static str

Source

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

Overrides the default batch size of the pipeline

Trait Implementations§

Source§

impl<I: Chunk, O: Chunk> BatchableTransformer for &dyn BatchableTransformer<Input = I, Output = O>

Source§

type Input = I

Source§

type Output = O

Source§

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

Transforms a batch of nodes into a stream of nodes
Source§

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

Overrides the default concurrency of the pipeline
Source§

fn name(&self) -> &'static str

Source§

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

Overrides the default batch size of the pipeline
Source§

impl<I: Chunk, O: Chunk> BatchableTransformer for Box<dyn BatchableTransformer<Input = I, Output = O>>

Source§

type Input = I

Source§

type Output = O

Source§

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

Transforms a batch of nodes into a stream of nodes
Source§

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

Overrides the default concurrency of the pipeline
Source§

fn name(&self) -> &'static str

Source§

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

Overrides the default batch size of the pipeline
Source§

impl<I, O> WithBatchIndexingDefaults for Box<dyn BatchableTransformer<Input = I, Output = O>>

Source§

fn with_indexing_defaults(&mut self, indexing_defaults: IndexingDefaults)

Source§

impl<I, O> WithBatchIndexingDefaults for dyn BatchableTransformer<Input = I, Output = O>

Source§

fn with_indexing_defaults(&mut self, _indexing_defaults: IndexingDefaults)

Implementations on Foreign Types§

Source§

impl<I: Chunk, O: Chunk> BatchableTransformer for Box<dyn BatchableTransformer<Input = I, Output = O>>

Source§

type Input = I

Source§

type Output = O

Source§

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

Source§

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

Source§

fn name(&self) -> &'static str

Implementors§

Source§

impl BatchableTransformer for MockBatchableTransformer

Source§

impl<F> BatchableTransformer for F

Use a closure as a batchable transformer

Source§

impl<I: Chunk, O: Chunk> BatchableTransformer for &dyn BatchableTransformer<Input = I, Output = O>

Source§

type Input = I

Source§

type Output = O

Source§

impl<I: Chunk, O: Chunk> BatchableTransformer for Arc<dyn BatchableTransformer<Input = I, Output = O>>

Source§

type Input = I

Source§

type Output = O