[][src]Struct automafish::Builder

pub struct Builder<TCriteria, TAction> { /* fields omitted */ }

A state machine builder.

The Builder allows defining the state machine as a Nondeterministic Finite Automaton using Self::add_state and Self::add_transition methods. Once the state machine is described in such a way the final StateMachine can be built with the Self::build method.

Implementations

impl<TCriteria, TAction> Builder<TCriteria, TAction> where
    TCriteria: Criteria
[src]

pub fn new() -> Self[src]

Create a new Builder

pub fn create_initial_state(&mut self) -> StateRef[src]

Create a new initial state.

Each initial state is unique in regards to their transitions. Multiple initial states may be used to separate automata that might have different transitions to their initial states.

pub fn add_state(&mut self, state: State<TAction>) -> StateRef[src]

Add a new state to the builder.

pub fn add_transition(&mut self, transition: Transition<TCriteria>)[src]

Add a new transition between builder states.

pub fn build(self) -> StateMachine<TCriteria, TAction>[src]

Consume the builder, returning a final StateMachine.

Trait Implementations

impl<TCriteria: Debug, TAction: Debug> Debug for Builder<TCriteria, TAction>[src]

impl<TCriteria, TAction> Default for Builder<TCriteria, TAction> where
    TCriteria: Criteria
[src]

Auto Trait Implementations

impl<TCriteria, TAction> RefUnwindSafe for Builder<TCriteria, TAction> where
    TAction: RefUnwindSafe,
    TCriteria: RefUnwindSafe

impl<TCriteria, TAction> Send for Builder<TCriteria, TAction> where
    TAction: Send,
    TCriteria: Send

impl<TCriteria, TAction> Sync for Builder<TCriteria, TAction> where
    TAction: Sync,
    TCriteria: Sync

impl<TCriteria, TAction> Unpin for Builder<TCriteria, TAction> where
    TAction: Unpin,
    TCriteria: Unpin

impl<TCriteria, TAction> UnwindSafe for Builder<TCriteria, TAction> where
    TAction: UnwindSafe,
    TCriteria: 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<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.