Trait Transformer

Source
pub trait Transformer:
    Send
    + Sync
    + DynClone {
    // Required method
    fn transform_node<'life0, 'async_trait>(
        &'life0 self,
        node: Node,
    ) -> Pin<Box<dyn Future<Output = Result<Node>> + 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 Methods§

Source

fn transform_node<'life0, 'async_trait>( &'life0 self, node: Node, ) -> Pin<Box<dyn Future<Output = Result<Node>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

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

Overrides the default concurrency of the pipeline

Source

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

Trait Implementations§

Source§

impl Transformer for &dyn Transformer

Source§

fn transform_node<'life0, 'async_trait>( &'life0 self, node: Node, ) -> Pin<Box<dyn Future<Output = Result<Node>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

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

Overrides the default concurrency of the pipeline
Source§

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

Source§

impl Transformer for Box<dyn Transformer>

Source§

fn transform_node<'life0, 'async_trait>( &'life0 self, node: Node, ) -> Pin<Box<dyn Future<Output = Result<Node>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

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

Overrides the default concurrency of the pipeline
Source§

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

Source§

impl WithIndexingDefaults for Box<dyn Transformer>

Source§

fn with_indexing_defaults(&mut self, indexing_defaults: IndexingDefaults)

Source§

impl WithIndexingDefaults for dyn Transformer

Source§

fn with_indexing_defaults(&mut self, _indexing_defaults: IndexingDefaults)

Implementations on Foreign Types§

Source§

impl Transformer for Box<dyn Transformer>

Source§

fn transform_node<'life0, 'async_trait>( &'life0 self, node: Node, ) -> Pin<Box<dyn Future<Output = Result<Node>> + 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 Transformer for &dyn Transformer

Source§

impl Transformer for Arc<dyn Transformer>

Source§

impl Transformer for MockTransformer

Source§

impl<F> Transformer for F
where F: Fn(Node) -> Result<Node> + Send + Sync + Clone,

Use a closure as a transformer