pub trait Transformer:
Send
+ Sync
+ DynClone {
type Input: Chunk;
type Output: Chunk;
// Required method
fn transform_node<'life0, 'async_trait>(
&'life0 self,
node: Node<Self::Input>,
) -> Pin<Box<dyn Future<Output = Result<Node<Self::Output>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn concurrency(&self) -> Option<usize> { ... }
fn name(&self) -> &'static str { ... }
}
Expand description
Transforms single nodes into single nodes
Required Associated Types§
Required Methods§
fn transform_node<'life0, 'async_trait>(
&'life0 self,
node: Node<Self::Input>,
) -> Pin<Box<dyn Future<Output = Result<Node<Self::Output>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Sourcefn concurrency(&self) -> Option<usize>
fn concurrency(&self) -> Option<usize>
Overrides the default concurrency of the pipeline
fn name(&self) -> &'static str
Trait Implementations§
Source§impl<I: Chunk, O: Chunk> Transformer for &dyn Transformer<Input = I, Output = O>
impl<I: Chunk, O: Chunk> Transformer for &dyn Transformer<Input = I, Output = O>
type Input = I
type Output = O
fn transform_node<'life0, 'async_trait>(
&'life0 self,
node: Node<Self::Input>,
) -> Pin<Box<dyn Future<Output = Result<Node<Self::Output>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn concurrency(&self) -> Option<usize>
fn concurrency(&self) -> Option<usize>
Overrides the default concurrency of the pipeline
fn name(&self) -> &'static str
Source§impl<I: Chunk, O: Chunk> Transformer for Box<dyn Transformer<Input = I, Output = O>>
impl<I: Chunk, O: Chunk> Transformer for Box<dyn Transformer<Input = I, Output = O>>
type Input = I
type Output = O
fn transform_node<'life0, 'async_trait>(
&'life0 self,
node: Node<Self::Input>,
) -> Pin<Box<dyn Future<Output = Result<Node<Self::Output>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn concurrency(&self) -> Option<usize>
fn concurrency(&self) -> Option<usize>
Overrides the default concurrency of the pipeline
fn name(&self) -> &'static str
Source§impl<I, O> WithIndexingDefaults for Box<dyn Transformer<Input = I, Output = O>>
impl<I, O> WithIndexingDefaults for Box<dyn Transformer<Input = I, Output = O>>
fn with_indexing_defaults(&mut self, indexing_defaults: IndexingDefaults)
Source§impl<I, O> WithIndexingDefaults for dyn Transformer<Input = I, Output = O>
impl<I, O> WithIndexingDefaults for dyn Transformer<Input = I, Output = O>
fn with_indexing_defaults(&mut self, _indexing_defaults: IndexingDefaults)
Implementations on Foreign Types§
Source§impl<I: Chunk, O: Chunk> Transformer for Box<dyn Transformer<Input = I, Output = O>>
impl<I: Chunk, O: Chunk> Transformer for Box<dyn Transformer<Input = I, Output = O>>
type Input = I
type Output = O
fn transform_node<'life0, 'async_trait>(
&'life0 self,
node: Node<Self::Input>,
) -> Pin<Box<dyn Future<Output = Result<Node<Self::Output>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn concurrency(&self) -> Option<usize>
fn name(&self) -> &'static str
Implementors§
Source§impl<F> Transformer for F
Use a closure as a transformer
impl<F> Transformer for F
Use a closure as a transformer