Trait swiftide_core::indexing_traits::Transformer

source ·
pub trait Transformer: Send + Sync {
    // 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 method
    fn concurrency(&self) -> Option<usize> { ... }
}
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

Trait Implementations§

Implementors§

source§

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

Use a closure as a transformer