[][src]Struct gf::ai::executor::PathExecutor

pub struct PathExecutor<'a, 'i, D, I, T> where
    D: Direction,
    I: Interp<'a, D>,
    T: IpaTactic<I::State>, 
{ /* fields omitted */ }

🟢 Executor for interpreting code along a single path.

The path executor is an iterator and must be driven to produce new states. The iterator implementation returns an element of the trivial lattice {⊥, ⊤} which shows whether the iteration has stopped.

You can access the current state by calling state or into_state.

Implementations

impl<'a, 'i, D, I, T> PathExecutor<'a, 'i, D, I, T> where
    D: Direction,
    I: Interp<'a, D>,
    T: IpaTactic<I::State>, 
[src]

pub fn new(
    interp: &'i I,
    state: PathExecutorState<'a, D, I>,
    ipa_tactic: T
) -> Self
[src]

Create a path executor.

pub fn interp(&self) -> &'i I[src]

Return the interpretation.

pub fn ipa_tactic(&self) -> &T[src]

Return the IPA tactic.

pub fn stack(&self) -> &[PathExecutorFrame<'a, D, I>][src]

Return a slice of saved stack frames ordered from deep to shallow.

pub fn state(&self) -> Option<&PathExecutorState<'a, D, I>>[src]

Return the current state.

pub fn into_state(self) -> Option<PathExecutorState<'a, D, I>>[src]

Consume the executor to extract its state.

Trait Implementations

impl<'a, 'i, D, I, T> FusedIterator for PathExecutor<'a, 'i, D, I, T> where
    D: Direction,
    I: Interp<'a, D>,
    T: IpaTactic<I::State>, 
[src]

impl<'a, 'i, D, I, T> Iterator for PathExecutor<'a, 'i, D, I, T> where
    D: Direction,
    I: Interp<'a, D>,
    T: IpaTactic<I::State>, 
[src]

type Item = ()

The type of the elements being iterated over.

Auto Trait Implementations

impl<'a, 'i, D, I, T> RefUnwindSafe for PathExecutor<'a, 'i, D, I, T> where
    D: RefUnwindSafe,
    I: RefUnwindSafe,
    T: RefUnwindSafe,
    <I as Interp<'a, D>>::State: RefUnwindSafe

impl<'a, 'i, D, I, T> Send for PathExecutor<'a, 'i, D, I, T> where
    D: Send,
    I: Sync,
    T: Send,
    <I as Interp<'a, D>>::State: Send

impl<'a, 'i, D, I, T> Sync for PathExecutor<'a, 'i, D, I, T> where
    D: Sync,
    I: Sync,
    T: Sync,
    <I as Interp<'a, D>>::State: Sync

impl<'a, 'i, D, I, T> Unpin for PathExecutor<'a, 'i, D, I, T> where
    D: Unpin,
    T: Unpin,
    <I as Interp<'a, D>>::State: Unpin

impl<'a, 'i, D, I, T> UnwindSafe for PathExecutor<'a, 'i, D, I, T> where
    D: UnwindSafe,
    I: RefUnwindSafe,
    T: UnwindSafe,
    <I as Interp<'a, D>>::State: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.