Mappers

Trait Mappers 

Source
pub trait Mappers: Sync {
    type Output;

    // Required methods
    fn map_noop<'a>(
        &'a self,
        tst_node: Noop,
    ) -> BoxFuture<'a, Result<Self::Output>>;
    fn map_seq<'a>(
        &'a self,
        tst_node: Seq,
    ) -> BoxFuture<'a, Result<Self::Output>>;
    fn map_conc<'a>(
        &'a self,
        tst_node: Conc,
    ) -> BoxFuture<'a, Result<Self::Output>>;
    fn map_move_to<'a>(
        &'a self,
        tst_node: MoveTo,
    ) -> BoxFuture<'a, Result<Self::Output>>;
    fn map_search_area<'a>(
        &'a self,
        tst_node: SearchArea,
    ) -> BoxFuture<'a, Result<Self::Output>>;
}
Expand description

Trait representing the mappers for each type of tree node

Required Associated Types§

Source

type Output

Result of the mapping

Required Methods§

Source

fn map_noop<'a>(&'a self, tst_node: Noop) -> BoxFuture<'a, Result<Self::Output>>

Map a noop node

Source

fn map_seq<'a>(&'a self, tst_node: Seq) -> BoxFuture<'a, Result<Self::Output>>

Map a sequential node

Source

fn map_conc<'a>(&'a self, tst_node: Conc) -> BoxFuture<'a, Result<Self::Output>>

Map a concurrent node

Source

fn map_move_to<'a>( &'a self, tst_node: MoveTo, ) -> BoxFuture<'a, Result<Self::Output>>

Map a move to node

Source

fn map_search_area<'a>( &'a self, tst_node: SearchArea, ) -> BoxFuture<'a, Result<Self::Output>>

Map a search area node

Implementors§

Source§

impl<TOutput, TNoopMapper, TSeqMapper, TConcMapper, TMoveToMapper, TSearchAreaMapper> Mappers for TreeMapper<TOutput, TNoopMapper, TSeqMapper, TConcMapper, TMoveToMapper, TSearchAreaMapper>
where TNoopMapper: Mapper<Noop, TOutput>, TSeqMapper: Mapper<Seq, TOutput>, TConcMapper: Mapper<Conc, TOutput>, TMoveToMapper: Mapper<MoveTo, TOutput>, TSearchAreaMapper: Mapper<SearchArea, TOutput>,

Source§

type Output = TOutput