Mapper

Trait Mapper 

Source
pub trait Mapper<TInput, TOutput>: Send + Sync {
    // Required method
    fn map<'a, 'b, M>(
        &'a self,
        mappers: &'b M,
        t: TInput,
    ) -> BoxFuture<'b, Result<TOutput>>
       where M: Mappers<Output = TOutput> + Send,
             TInput: 'b;
}
Expand description

Mapper trait

Required Methods§

Source

fn map<'a, 'b, M>( &'a self, mappers: &'b M, t: TInput, ) -> BoxFuture<'b, Result<TOutput>>
where M: Mappers<Output = TOutput> + Send, TInput: 'b,

Map the node t

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<TNode> Mapper<TNode, Node> for IdentityMapper
where TNode: NodeTrait + Send,

Source§

impl<TNode, TOutput, TAccumulator> Mapper<TNode, TOutput> for CompositeNodeMapper<TOutput, TAccumulator>
where TNode: CompositeNode + Send + IntoIterator<Item = Node, IntoIter: Send>, TAccumulator: Accumulator<TOutput> + Send,