[][src]Struct finny::decl::FsmBuilder

pub struct FsmBuilder<TFsm, TContext> {
    pub _fsm: PhantomData<TFsm>,
    pub _context: PhantomData<TContext>,
}

The main builder-API for defining your Finny state machine.

Fields

_fsm: PhantomData<TFsm>_context: PhantomData<TContext>

Implementations

impl<TFsm, TContext> FsmBuilder<TFsm, TContext> where
    TFsm: FsmBackend
[src]

pub fn initial_state<TSTate>(&mut self)[src]

Sets the initial state of the state machine. Required!

pub fn initial_states<TStates>(&mut self)[src]

Defines multiple initial states for multiple regions of the FSM. The type has to be a tuple of the initial states for each region.

Example : fsm.initial_states<(StateA, StateX)>()

pub fn state<TState>(&mut self) -> FsmStateBuilder<TFsm, TContext, TState>[src]

Adds some information about a state.

pub fn build(self) -> BuiltFsm[src]

Builds the final machine. Has to be returned from the definition function.

Trait Implementations

impl<TFsm: Default, TContext: Default> Default for FsmBuilder<TFsm, TContext>[src]

Auto Trait Implementations

impl<TFsm, TContext> RefUnwindSafe for FsmBuilder<TFsm, TContext> where
    TContext: RefUnwindSafe,
    TFsm: RefUnwindSafe
[src]

impl<TFsm, TContext> Send for FsmBuilder<TFsm, TContext> where
    TContext: Send,
    TFsm: Send
[src]

impl<TFsm, TContext> Sync for FsmBuilder<TFsm, TContext> where
    TContext: Sync,
    TFsm: Sync
[src]

impl<TFsm, TContext> Unpin for FsmBuilder<TFsm, TContext> where
    TContext: Unpin,
    TFsm: Unpin
[src]

impl<TFsm, TContext> UnwindSafe for FsmBuilder<TFsm, TContext> where
    TContext: UnwindSafe,
    TFsm: UnwindSafe
[src]

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.