TreeExecutorTrait

Trait TreeExecutorTrait 

Source
pub trait TreeExecutorTrait {
    type SeqExecutor: Executor<Seq>;
    type ConcExecutor: Executor<Conc>;
    type MoveToExecutor: Executor<MoveTo>;
    type SearchAreaExecutor: Executor<SearchArea>;

    // Required methods
    fn from_agent<TAgent>(agent: &TAgent) -> Self
       where Self::SeqExecutor: CreatableFromAgent<TAgent, Self::SeqExecutor>,
             Self::ConcExecutor: CreatableFromAgent<TAgent, Self::ConcExecutor>,
             Self::MoveToExecutor: CreatableFromAgent<TAgent, Self::MoveToExecutor>,
             Self::SearchAreaExecutor: CreatableFromAgent<TAgent, Self::SearchAreaExecutor>;
    fn execute(&self, t: Node) -> ExecutionResult<'_>;
}
Expand description

Base trait for the TreeExecutor

Required Associated Types§

Source

type SeqExecutor: Executor<Seq>

Executor for sequential nodes

Source

type ConcExecutor: Executor<Conc>

Executor for concurrent nodes

Source

type MoveToExecutor: Executor<MoveTo>

Executor for move_to nodes

Source

type SearchAreaExecutor: Executor<SearchArea>

Executor for search area nodes

Required Methods§

Source

fn from_agent<TAgent>(agent: &TAgent) -> Self

Create a new executor for the given agent

Source

fn execute(&self, t: Node) -> ExecutionResult<'_>

Execute the tst

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<TSeqExecutor: Executor<Seq>, TConcExecutor: Executor<Conc>, TMoveToExecutor: Executor<MoveTo>, TSearchAreaExecutor: Executor<SearchArea>> TreeExecutorTrait for TreeExecutor<TSeqExecutor, TConcExecutor, TMoveToExecutor, TSearchAreaExecutor>

Source§

type SeqExecutor = TSeqExecutor

Source§

type ConcExecutor = TConcExecutor

Source§

type MoveToExecutor = TMoveToExecutor

Source§

type SearchAreaExecutor = TSearchAreaExecutor