TreeMapper

Struct TreeMapper 

Source
pub struct TreeMapper<TOutput, TNoopMapper: Mapper<Noop, TOutput>, TSeqMapper: Mapper<Seq, TOutput>, TConcMapper: Mapper<Conc, TOutput>, TMoveToMapper: Mapper<MoveTo, TOutput>, TSearchAreaMapper: Mapper<SearchArea, TOutput>> { /* private fields */ }
Expand description

Implementation of mapping for a tree

Implementations§

Source§

impl<TMoveToMapper, TSearchAreaMapper> TreeMapper<Node, IdentityMapper, CompositeNodeMapper<Node, TransformerAccumulator<Seq>>, CompositeNodeMapper<Node, TransformerAccumulator<Conc>>, TMoveToMapper, TSearchAreaMapper>
where TMoveToMapper: Mapper<MoveTo, Node> + Send, TSearchAreaMapper: Mapper<SearchArea, Node> + Send,

Source

pub fn new( move_to_mapper: TMoveToMapper, search_area_mapper: TSearchAreaMapper, ) -> Self

Create a new default tree transformer with the given node mappers

Trait Implementations§

Source§

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

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
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

Result of the mapping
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
Source§

impl<TOutput, TNoopMapper, TSeqMapper, TConcMapper, TMoveToMapper, TSearchAreaMapper> TreeMapperTrait<TOutput> 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§

fn map<'a>(&'a self, t: Node) -> BoxFuture<'a, Result<TOutput>>

Map the tst

Source§

type SeqMapper = TSeqMapper

Mapper for sequential nodes
Source§

type ConcMapper = TConcMapper

Mapper for concurrent nodes
Source§

type MoveToMapper = TMoveToMapper

Mapper for move_to nodes
Source§

type SearchAreaMapper = TSearchAreaMapper

Mapper for search area nodes
Source§

fn map_direct(&self, t: Node) -> Result<TOutput>

Map the tst and block

Auto Trait Implementations§

§

impl<TOutput, TNoopMapper, TSeqMapper, TConcMapper, TMoveToMapper, TSearchAreaMapper> Freeze for TreeMapper<TOutput, TNoopMapper, TSeqMapper, TConcMapper, TMoveToMapper, TSearchAreaMapper>
where TNoopMapper: Freeze, TSeqMapper: Freeze, TConcMapper: Freeze, TMoveToMapper: Freeze, TSearchAreaMapper: Freeze,

§

impl<TOutput, TNoopMapper, TSeqMapper, TConcMapper, TMoveToMapper, TSearchAreaMapper> RefUnwindSafe for TreeMapper<TOutput, TNoopMapper, TSeqMapper, TConcMapper, TMoveToMapper, TSearchAreaMapper>
where TNoopMapper: RefUnwindSafe, TSeqMapper: RefUnwindSafe, TConcMapper: RefUnwindSafe, TMoveToMapper: RefUnwindSafe, TSearchAreaMapper: RefUnwindSafe,

§

impl<TOutput, TNoopMapper, TSeqMapper, TConcMapper, TMoveToMapper, TSearchAreaMapper> Send for TreeMapper<TOutput, TNoopMapper, TSeqMapper, TConcMapper, TMoveToMapper, TSearchAreaMapper>

§

impl<TOutput, TNoopMapper, TSeqMapper, TConcMapper, TMoveToMapper, TSearchAreaMapper> Sync for TreeMapper<TOutput, TNoopMapper, TSeqMapper, TConcMapper, TMoveToMapper, TSearchAreaMapper>

§

impl<TOutput, TNoopMapper, TSeqMapper, TConcMapper, TMoveToMapper, TSearchAreaMapper> Unpin for TreeMapper<TOutput, TNoopMapper, TSeqMapper, TConcMapper, TMoveToMapper, TSearchAreaMapper>
where TNoopMapper: Unpin, TSeqMapper: Unpin, TConcMapper: Unpin, TMoveToMapper: Unpin, TSearchAreaMapper: Unpin,

§

impl<TOutput, TNoopMapper, TSeqMapper, TConcMapper, TMoveToMapper, TSearchAreaMapper> UnwindSafe for TreeMapper<TOutput, TNoopMapper, TSeqMapper, TConcMapper, TMoveToMapper, TSearchAreaMapper>
where TNoopMapper: UnwindSafe, TSeqMapper: UnwindSafe, TConcMapper: UnwindSafe, TMoveToMapper: UnwindSafe, TSearchAreaMapper: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CompatExt for T

Source§

fn compat(self) -> Compat<T>

Applies the Compat adapter by value. Read more
Source§

fn compat_ref(&self) -> Compat<&T>

Applies the Compat adapter by shared reference. Read more
Source§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the Compat adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

Source§

fn is_within(&self, b: &G2) -> bool